wxywxy.ji Posted October 23, 2012 Posted October 23, 2012 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?
ulf.schroeter Posted October 24, 2012 Posted October 24, 2012 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
wxywxy.ji Posted October 26, 2012 Author Posted October 26, 2012 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.
ulf.schroeter Posted October 26, 2012 Posted October 26, 2012 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)
wxywxy.ji Posted October 30, 2012 Author Posted October 30, 2012 i can't send you the test data. because a lot texture , and mesh , etc ....
manguste Posted November 7, 2012 Posted November 7, 2012 You can use NodeSector to handle node loading in the background.
ulf.schroeter Posted November 9, 2012 Posted November 9, 2012 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
manguste Posted November 28, 2012 Posted November 28, 2012 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.
ulf.schroeter Posted November 28, 2012 Posted November 28, 2012 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 :)
manguste Posted November 28, 2012 Posted November 28, 2012 Asynchronous loading added to the wish list. But no ETA, I'm afraid.
wxywxy.ji Posted December 5, 2012 Author Posted December 5, 2012 how long time process Asynchronous loading? Improvement in the direction of?
manguste Posted December 17, 2012 Posted December 17, 2012 It'll be dealt with next year, Q1 most probably. More precise info will be available after we publish a roadmap for 2013.
wxywxy.ji Posted December 18, 2012 Author Posted December 18, 2012 that's good sound! but Unfortunately , we have not time. thank for reply.
Recommended Posts