kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14183
Very inefficient loading of 3D models
So I added a few print statements to my copy of the 3D viewer in order
to figure out why the 3D viewer was so slow...
The results were very interesting.
http://pastebin.com/7s8gXVjY
1) There is no caching whatsoever! The VRML/X3D files are loaded from
scratch each time they're instantiated in the board. If I have three
copies of a high-poly connector model, the VRML is loaded from disk and
parsed three times. This should be an O(1) operation rather than O(n),
with polygon data stored in some kind of application-wide cache and
referenced for each model instance.
2) The instantiated models are thrown out as soon as the 3D viewer
window is closed or the "reload board" button in the 3D viewer window is
clicked.
3) Models take an absurd amount of time to load. Three seconds for an
optimized release build to load a Molex HDMI connector (14k vertices and
9k faces) is completely unreasonable, FreeCad loads it in a few hundred
ms (too fast to measure easily).
Is anybody working on this already or should I start optimizing myself?
--
Andrew Zonenberg
PhD student, security group
Computer Science Department
Rensselaer Polytechnic Institute
http://colossus.cs.rpi.edu/~azonenberg/
Attachment:
signature.asc
Description: This is a digitally signed message part
Follow ups