discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Profiling the module/function performance ?

V
vicnet
Thu, Mar 22, 2018 1:03 PM

Hello,

I have almost 2 solutions to implements a module.
I there a way to test performance (time and/or nb triangles) of each
implementation ?

"F6 render" show some informations (cleaning cache every time) but my module
is too small to display something useful.
I try to duplicate the module with a loop on children but I have the same
result in two case so I suspect that I measure duplication time and not my
module time !

One module use polygon with point list.
Second one use difference().

a+
Vicnet

--
Sent from: http://forum.openscad.org/

Hello, I have almost 2 solutions to implements a module. I there a way to test performance (time and/or nb triangles) of each implementation ? "F6 render" show some informations (cleaning cache every time) but my module is too small to display something useful. I try to duplicate the module with a loop on children but I have the same result in two case so I suspect that I measure duplication time and not my module time ! One module use polygon with point list. Second one use difference(). a+ Vicnet -- Sent from: http://forum.openscad.org/
HL
Hans L
Thu, Mar 22, 2018 4:41 PM

I don't understand what the question is.  When you preview or render,
it reports the number of seconds it took to process the geometry. If
the number is too high for your taste, then you can try to make more
efficient module etc. and see if it runs in less time.

On Thu, Mar 22, 2018 at 8:03 AM, vicnet vo.publique@gmail.com wrote:

Hello,

I have almost 2 solutions to implements a module.
I there a way to test performance (time and/or nb triangles) of each
implementation ?

"F6 render" show some informations (cleaning cache every time) but my module
is too small to display something useful.
I try to duplicate the module with a loop on children but I have the same
result in two case so I suspect that I measure duplication time and not my
module time !

One module use polygon with point list.
Second one use difference().

a+
Vicnet

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I don't understand what the question is. When you preview or render, it reports the number of seconds it took to process the geometry. If the number is too high for your taste, then you can try to make more efficient module etc. and see if it runs in less time. On Thu, Mar 22, 2018 at 8:03 AM, vicnet <vo.publique@gmail.com> wrote: > Hello, > > I have almost 2 solutions to implements a module. > I there a way to test performance (time and/or nb triangles) of each > implementation ? > > "F6 render" show some informations (cleaning cache every time) but my module > is too small to display something useful. > I try to duplicate the module with a loop on children but I have the same > result in two case so I suspect that I measure duplication time and not my > module time ! > > > One module use polygon with point list. > Second one use difference(). > > a+ > Vicnet > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
RP
Ronaldo Persiano
Thu, Mar 22, 2018 8:26 PM

Em 22 de mar de 2018 13:42, "Hans L" thehans@gmail.com escreveu:

I don't understand what the question is.  When you preview or render,
it reports the number of seconds it took to process the geometry. If
the number is too high for your taste, then you can try to make more
efficient module etc. and see if it runs in less time.

On Thu, Mar 22, 2018 at 8:03 AM, vicnet vo.publique@gmail.com wrote:

Hello,

I have almost 2 solutions to implements a module.
I there a way to test performance (time and/or nb triangles) of each
implementation ?

"F6 render" show some informations (cleaning cache every time) but my

module

is too small to display something useful.
I try to duplicate the module with a loop on children but I have the same
result in two case so I suspect that I measure duplication time and not

my

module time !

One module use polygon with point list.
Second one use difference().

a+
Vicnet

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Em 22 de mar de 2018 13:42, "Hans L" <thehans@gmail.com> escreveu: > I don't understand what the question is. When you preview or render, > it reports the number of seconds it took to process the geometry. If > the number is too high for your taste, then you can try to make more > efficient module etc. and see if it runs in less time. > > > On Thu, Mar 22, 2018 at 8:03 AM, vicnet <vo.publique@gmail.com> wrote: > > Hello, > > > > I have almost 2 solutions to implements a module. > > I there a way to test performance (time and/or nb triangles) of each > > implementation ? > > > > "F6 render" show some informations (cleaning cache every time) but my > module > > is too small to display something useful. > > I try to duplicate the module with a loop on children but I have the same > > result in two case so I suspect that I measure duplication time and not > my > > module time ! > > > > > > One module use polygon with point list. > > Second one use difference(). > > > > a+ > > Vicnet > > > > > > > > -- > > Sent from: http://forum.openscad.org/ > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
T
Troberg
Fri, Mar 23, 2018 9:38 PM

I try to duplicate the module with a loop on children but I have the same
result in two case so I suspect that I measure duplication time and not my
module time !

Have you tried not using children (which I suppose is just making copies of
the already generated object) and instead repeatedly call the module in a
loop?

--
Sent from: http://forum.openscad.org/

> I try to duplicate the module with a loop on children but I have the same > result in two case so I suspect that I measure duplication time and not my > module time ! Have you tried not using children (which I suppose is just making copies of the already generated object) and instead repeatedly call the module in a loop? -- Sent from: http://forum.openscad.org/
RP
Ronaldo Persiano
Fri, Mar 23, 2018 11:01 PM

One module use polygon with point list.
Second one use difference().

​I would not expect big differences with 2D models. Anyway, remember that
OpenSCAD saves models in cache so there is no duplicate effort if the very
same model is used many times.​

> > One module use polygon with point list. > Second one use difference(). > ​I would not expect big differences with 2D models. Anyway, remember that OpenSCAD saves models in cache so there is no duplicate effort if the very same model is used many times.​
V
vicnet
Sat, Mar 24, 2018 7:12 AM

I don't understand what the question is.  When you preview or render,
it reports the number of seconds it took to process the geometry. If
the number is too high for your taste, then you can try to make more
efficient module etc. and see if it runs in less time.

The render value is fine to have some perf values.
The pb is how to test 2 implementations that take few time (milliseconds o
rless?) each so that it is not comparable for one call with render?

Troberg wrote

Have you tried not using children (which I suppose is just making copies
of
the already generated object) and instead repeatedly call the module in a
loop?

Yes, you're right.
i use children() to duplicate so certainly cache is used and I measure
children+cache functions not my module !

I will try to duplicate directly.

Thanks.

a+
vicnet

--
Sent from: http://forum.openscad.org/

> I don't understand what the question is. When you preview or render, > it reports the number of seconds it took to process the geometry. If > the number is too high for your taste, then you can try to make more > efficient module etc. and see if it runs in less time. The render value is fine to have some perf values. The pb is how to test 2 implementations that take few time (milliseconds o rless?) each so that it is not comparable for one call with render? Troberg wrote > Have you tried not using children (which I suppose is just making copies > of > the already generated object) and instead repeatedly call the module in a > loop? Yes, you're right. i use children() to duplicate so certainly cache is used and I measure children+cache functions not my module ! I will try to duplicate directly. Thanks. a+ vicnet -- Sent from: http://forum.openscad.org/