06-24-2014 05:13 AM
I am reading an XML file into my application the XML file can vary in size but the larger files ( say 20mb) take forever to process using the Read from XML file Vi. Any suggestions on how to improve the response time? It can take anything up to a minute if not longer
06-24-2014 05:16 AM
That sounds strange, can you post vi and an example file?
/Y
06-24-2014 05:25 AM
Hi Yamaeda
Please see attached the code.
06-24-2014 05:33 AM
Hi,
Can you save the code for LV2011 and post it.
I am using LV2011, I was not able to open the VI that you have sahred.
06-24-2014 05:35 AM
@Pankajusic wrote:
Hi,
Can you save the code for LV2011 and post it.
I am using LV2011, I was not able to open the VI that you have sahred.
Here you go
06-24-2014 05:50 AM
The XML parsing taking lot of time (To be exact the "FindMatchingCloseTag.vi").Is there any specific requirement to have the file in XML format? Else you can try .bin or data log file. You can write the Cluster array and read it at a glance.
06-24-2014 05:51 AM
My file has to be in XML format the XML file is generated from another program and my application deals with that XML file
06-24-2014 06:07 AM - edited 06-24-2014 06:09 AM
Holy moly! Close to 500k of lines in a single XML file! That is really HUGE.
That being said, loading this in IE9 hangs the complete IE process.
Using Notepad++, the file loads within a few seconds, but scrolling is very slow.
Using your VI, the "XML Elements" indicator fills after about 20s after start, the "value" indicator after about an additional 20s.
So LV seems to "operate" on "an average" regarding performance of reading and displaying the content of the XML file.
Are you simply looking for the content string (like Notepad++) or are you interested in "node information" directly when reading the file?
Norbert
EDIT: After writing the post (more than a minute) i've seen that the IE process settled and was responding again. So IE takes surely about or more than a minute to load and display the XML content, but does not hang competly as my post might induce.
06-24-2014 06:09 AM
I tried with 7 MB file and for that it took ~68 seconds to load and I can see how long it will take to load a file of around 200MB. How did you arrive at the Array of cluster? Is the other application you meant is also on LabVIEW platform?. I am not experienced with XML but trying what I can do.
06-24-2014 06:11 AM
When I read the XML file each element is displayed in a table with certain unbundled information that I want. The table is controlled by a mouse down event which clicked loads the coressponding image to the data set that has been clicked. I also use "Centre of Mass X" + "Centre of Mass Y" to draw points on an XY graph