LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from XML performance issues

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 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 19
(2,427 Views)

That sounds strange, can you post vi and an example file?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 19
(2,426 Views)

Hi 

 

 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
Download All
0 Kudos
Message 3 of 19
(2,419 Views)

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.

0 Kudos
Message 4 of 19
(2,415 Views)

@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 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 5 of 19
(2,407 Views)

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.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 19
(2,391 Views)

My file has to be in XML format the XML file is generated from another program and my application deals with that XML file

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 7 of 19
(2,389 Views)

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.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 19
(2,380 Views)

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.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 19
(2,375 Views)

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 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 10 of 19
(2,369 Views)