Jump to content

[SOLVED] too slow ( load xml , clear xml )


photo

Recommended Posts

Posted

large xml data

 

1. load tree -> delay time : 51.290901 ms

 

Xml a;

a.load( "t.xml" );

 

2. parser and make node -> delay time : 140.259293 ms

 

3. Clear XML -> delay time : 20.141502 ms

 

Improvement?

Posted

It's NO good idea to load files in render loop as I) file access time is unpredictable and II) XML parsing is a heavy-weight operation ! Try to do the load and parse XML data during init and cache the required data parts for fast access during rendering

Posted

XML FileSize is 837K ( a lot of Nodes ).

 

my terrain is seamless zone.

 

i can not load during init.

 

i think that i can process 1 and 3 by thread.

 

but

 

i can not process 2.

Posted

Your current approach with such large XML node processing within render loop seems to be wrong by design. What do you what to achive functionally during 2 ? If you could describe your functional requirements (not your technical approach) a little bit more detailed, it might be possible to discuss some alternative approaches (e.g. using binary file for much faster parsing, using step-wise processing of 2 by spreading work over several frames based on some per-frame time limits, etc)

Posted

i can't send you the test data.

 

because a lot texture , and mesh , etc ....

  • 2 weeks later...
Posted

You can use NodeSector to handle node loading in the background.

Posted
You can use NodeSector to handle node loading in the background.
Just for loading textures, meshes or mask images of loaded xml world sub-tree structure, but I don`t think it can be used for background loadind of general xml data structures
  • 3 weeks later...
Posted

Yes, you are absolutely right. But judging by the delay time that was provided above, it's actually resources loading that eats up the time, hence the tip.

Posted

Just guessing, but mesh/texture resource loading will be handled by filesystem thread asynchronously in the background, but the general approach of file loading and parsing 900K XML (!) data in the render loop is not the best idea...at least you shouldn't be surprised by some heavy render stall :)

Posted

Asynchronous loading added to the wish list. But no ETA, I'm afraid.

Posted

how long time process Asynchronous loading?

 

Improvement in the direction of?

  • 2 weeks later...
Posted

It'll be dealt with next year, Q1 most probably. More precise info will be available after we publish a roadmap for 2013.

Posted

that's good sound!

 

but

 

Unfortunately , we have not time.

 

thank for reply.

×
×
  • Create New...