Render time debugging

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Render time debugging

Brad Pitcher
Is there an easy, quick modification to openscad to have it print out the time to render each line of code for debugging purposes? For complex models, it would be really helpful to figure out which part of the model is taking the longest so I can work to improve render time.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Render time debugging

kintel
Administrator
On Mar 4, 2014, at 22:55 PM, Brad Pitcher <[hidden email]> wrote:

> Is there an easy, quick modification to openscad to have it print out the time to render each line of code for debugging purposes? For complex models, it would be really helpful to figure out which part of the model is taking the longest so I can work to improve render time.

No, we don’t have a mapping from the source code to the internal tree. This is, however, something I’d really like to see. Once we have such a mapping, we could also implement possibilities to select a line in the editor and have the corresponding object highlighted in 3D, and vice versa.
This would furthermore open a bunch of opportunities for mouse-based interaction and querying.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: Render time debugging

Joseph Lenox
It seems as if any state mapper would need to have the relevant file name and "stack trace" (similar as you'd get in a debugger) available.

I suspect that a source modification to permit profiling of the rendering (profile the individual components and sum their times together for the upper-level) would be a start. Perhaps output to the log at each position in the tree?



Joseph Lenox, MS.
I'm an engineer. I solve problems.


On Tue, Mar 4, 2014 at 10:24 PM, Marius Kintel <[hidden email]> wrote:
On Mar 4, 2014, at 22:55 PM, Brad Pitcher <[hidden email]> wrote:

> Is there an easy, quick modification to openscad to have it print out the time to render each line of code for debugging purposes? For complex models, it would be really helpful to figure out which part of the model is taking the longest so I can work to improve render time.

No, we don’t have a mapping from the source code to the internal tree. This is, however, something I’d really like to see. Once we have such a mapping, we could also implement possibilities to select a line in the editor and have the corresponding object highlighted in 3D, and vice versa.
This would furthermore open a bunch of opportunities for mouse-based interaction and querying.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566