TX2D 3.1.5 Beta - Scene files are polluted with unused materials (waste of memory)
by Giuseppe De Francesco · in Torque X 2D · 06/08/2010 (2:38 pm) · 8 replies
Build: 3.1.5 Beta
Platform: Windows 7, 32 bit (I think it doesn't matter)
Target: Editor
Issues: In the scene files are stored all the project materials, animations, particles and so on, not only the ones used in the given scene. This causes the Engine to deserialize a lot of useless objects wasting time and memory.
Steps to Repeat:
1. Create a TX project
2. Add some materials
3. Create a new scene and use just one material and save.
4. Have a look to the content of the .txscene file: it contains all the materials instead of just the one added to the scene.
Suggested Fix: Parse the scene and serialize just what's needed.
Platform: Windows 7, 32 bit (I think it doesn't matter)
Target: Editor
Issues: In the scene files are stored all the project materials, animations, particles and so on, not only the ones used in the given scene. This causes the Engine to deserialize a lot of useless objects wasting time and memory.
Steps to Repeat:
1. Create a TX project
2. Add some materials
3. Create a new scene and use just one material and save.
4. Have a look to the content of the .txscene file: it contains all the materials instead of just the one added to the scene.
Suggested Fix: Parse the scene and serialize just what's needed.
About the author
In the software eng. field since 1981, in charge of R&D during last 10 years. IEEE Senior Member (and volunteer).
#2
going to review it in a moment, just finishing this first tour of well known bugs ;)
06/08/2010 (3:04 pm)
Hey Josh,going to review it in a moment, just finishing this first tour of well known bugs ;)
#3
06/08/2010 (4:34 pm)
Logged as TRQX-76
#4
06/09/2010 (5:12 am)
@Josh: you could set it up to run automatically as a pre-build step
#5
06/09/2010 (7:10 am)
True but I would favour an out of the box solution.
#6
06/09/2010 (11:53 am)
You could try multiple project files, I've used this method in the past, and it worked for me. Just copy and past your TXProj file, and name it Game2, or Game_Level2.
#7
06/09/2010 (12:18 pm)
With 20+ scenes the level ripper actually takes a bit of time (probably 30 seconds or so) to run through all of the scenes. I only run it when a change is made to a scene. Otherwise if just doing code it doesn't make sense to have that extra 30 seconds every time I run the project.
#8
06/25/2010 (9:37 am)
In the new beta this bug is not fixed yet.
Torque Owner Josh Neider
Also, Pino would have had time to review ZSHD instead of writing this post if it wasn't an issue! :)