discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Animations and memory use

J
jon
Wed, Mar 1, 2023 2:17 PM

I started a run of 200 animation frames last night; I have about 50 more
frames to go.  Memory use started at about 350 KB, and is now around 3.5
GB.  Clearly, at some point this process will die because of increasing
use of memory.

Is there a way to have OpenSCAD clear the caches prior to each F5,
either always, or only in Animation mode?

Is there a way to have an OpenSCAD program ask to clear the caches at
the start of a program?

These appear to be useful features for some uses.

Jon

I started a run of 200 animation frames last night; I have about 50 more frames to go.  Memory use started at about 350 KB, and is now around 3.5 GB.  Clearly, at some point this process will die because of increasing use of memory. Is there a way to have OpenSCAD clear the caches prior to each F5, either always, or only in Animation mode? Is there a way to have an OpenSCAD program ask to clear the caches at the start of a program? These appear to be useful features for some uses. Jon
JB
Jordan Brown
Wed, Mar 1, 2023 5:42 PM

On 3/1/2023 6:17 AM, jon wrote:

Is there a way to have OpenSCAD clear the caches prior to each F5,
either always, or only in Animation mode?

I'm not aware of one.

Is there a way to have an OpenSCAD program ask to clear the caches at
the start of a program?

No.

This must be a really, really complex model if previewing is taking this
long.  Or do you have minkowski() or render() in it?

On 3/1/2023 6:17 AM, jon wrote: > Is there a way to have OpenSCAD clear the caches prior to each F5, > either always, or only in Animation mode? I'm not aware of one. > Is there a way to have an OpenSCAD program ask to clear the caches at > the start of a program? No. This must be a really, really complex model if previewing is taking this long.  Or do you have minkowski() or render() in it?
J
jon
Wed, Mar 1, 2023 5:48 PM

No minkowski and no render.  Since I am only changing the camera view,
render() might be useful, but I've never understood how to use it (only
that the experts rave about it).  The model has perhaps 10,000 spheres
in it.  It is art, not practical.  I downloaded the snapshot and will
try the lazy unions later.

On 3/1/2023 12:42 PM, Jordan Brown wrote:

On 3/1/2023 6:17 AM, jon wrote:

Is there a way to have OpenSCAD clear the caches prior to each F5,
either always, or only in Animation mode?

I'm not aware of one.

Is there a way to have an OpenSCAD program ask to clear the caches at
the start of a program?

No.

This must be a really, really complex model if previewing is taking
this long.  Or do you have minkowski() or render() in it?

No minkowski and no render.  Since I am only changing the camera view, render() might be useful, but I've never understood how to use it (only that the experts rave about it).  The model has perhaps 10,000 spheres in it.  It is art, not practical.  I downloaded the snapshot and will try the lazy unions later. On 3/1/2023 12:42 PM, Jordan Brown wrote: > On 3/1/2023 6:17 AM, jon wrote: >> Is there a way to have OpenSCAD clear the caches prior to each F5, >> either always, or only in Animation mode? > > I'm not aware of one. > >> Is there a way to have an OpenSCAD program ask to clear the caches at >> the start of a program? > > No. > > This must be a really, really complex model if previewing is taking > this long.  Or do you have minkowski() or render() in it?
JB
Jordan Brown
Wed, Mar 1, 2023 5:50 PM

On 3/1/2023 9:48 AM, jon wrote:

No minkowski and no render.  Since I am only changing the camera view,
render() might be useful, but I've never understood how to use it
(only that the experts rave about it).  The model has perhaps 10,000
spheres in it.  It is art, not practical.  I downloaded the snapshot
and will try the lazy unions later.

Ah.  Yes, 10K of anything is a complex model.

Some people like render().  I've found it useful for fixing one or two
kinds of preview artifacts, but not really otherwise.  Maybe I don't
have the right use cases or haven't seen the light.

On 3/1/2023 9:48 AM, jon wrote: > No minkowski and no render.  Since I am only changing the camera view, > render() might be useful, but I've never understood how to use it > (only that the experts rave about it).  The model has perhaps 10,000 > spheres in it.  It is art, not practical.  I downloaded the snapshot > and will try the lazy unions later. Ah.  Yes, 10K of anything is a complex model. Some people like render().  I've found it useful for fixing one or two kinds of preview artifacts, but not really otherwise.  Maybe I don't have the right use cases or haven't seen the light.
NH
nop head
Wed, Mar 1, 2023 6:18 PM

Maybe if the model doesn't change, only the camera angle, then a render of
the whole scene would be calculated slowly and then cached, so after the
first frame it would be fast.

However a render with 10000 objects might take longer than the universe
will last.

Lazy union would only be useful if you are doing F6 but for animation you
are only doing F5 and union is free for F5.

On Wed, 1 Mar 2023 at 17:50, Jordan Brown openscad@jordan.maileater.net
wrote:

On 3/1/2023 9:48 AM, jon wrote:

No minkowski and no render.  Since I am only changing the camera view,
render() might be useful, but I've never understood how to use it (only
that the experts rave about it).  The model has perhaps 10,000 spheres in
it.  It is art, not practical.  I downloaded the snapshot and will try the
lazy unions later.

Ah.  Yes, 10K of anything is a complex model.

Some people like render().  I've found it useful for fixing one or two
kinds of preview artifacts, but not really otherwise.  Maybe I don't have
the right use cases or haven't seen the light.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Maybe if the model doesn't change, only the camera angle, then a render of the whole scene would be calculated slowly and then cached, so after the first frame it would be fast. However a render with 10000 objects might take longer than the universe will last. Lazy union would only be useful if you are doing F6 but for animation you are only doing F5 and union is free for F5. On Wed, 1 Mar 2023 at 17:50, Jordan Brown <openscad@jordan.maileater.net> wrote: > On 3/1/2023 9:48 AM, jon wrote: > > No minkowski and no render. Since I am only changing the camera view, > render() might be useful, but I've never understood how to use it (only > that the experts rave about it). The model has perhaps 10,000 spheres in > it. It is art, not practical. I downloaded the snapshot and will try the > lazy unions later. > > > Ah. Yes, 10K of anything is a complex model. > > Some people like render(). I've found it useful for fixing one or two > kinds of preview artifacts, but not really otherwise. Maybe I don't have > the right use cases or haven't seen the light. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
J
jon
Wed, Mar 1, 2023 6:21 PM

Yes, I've not been brave enough to try an F6 again after it failed last
time.

Lazy union does not seem to be helping much with F5

Does anyone know how to tell if  OpenSCAD is busy animating or not in
the latest snapshot?  I have to set a 10 minute timer, and then come
back and see what it is doing.  Infuriating.

I hate being a leader.

Jon

On 3/1/2023 1:18 PM, nop head wrote:

Maybe if the model doesn't change, only the camera angle, then a
render of the whole scene would be calculated slowly and then cached,
so after the first frame it would be fast.

However a render with 10000 objects might take longer than the
universe will last.

Lazy union would only be useful if you are doing F6 but for animation
you are only doing F5 and union is free for F5.

On Wed, 1 Mar 2023 at 17:50, Jordan Brown
openscad@jordan.maileater.net wrote:

 On 3/1/2023 9:48 AM, jon wrote:
 No minkowski and no render.  Since I am only changing the camera
 view, render() might be useful, but I've never understood how to
 use it (only that the experts rave about it).  The model has
 perhaps 10,000 spheres in it.  It is art, not practical.  I
 downloaded the snapshot and will try the lazy unions later.
 Ah.  Yes, 10K of anything is a complex model.

 Some people like render().  I've found it useful for fixing one or
 two kinds of preview artifacts, but not really otherwise.  Maybe I
 don't have the right use cases or haven't seen the light.
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Yes, I've not been brave enough to try an F6 again after it failed last time. Lazy union does not seem to be helping much with F5 Does anyone know how to tell if  OpenSCAD is busy animating or not in the latest snapshot?  I have to set a 10 minute timer, and then come back and see what it is doing.  Infuriating. I hate being a leader. Jon On 3/1/2023 1:18 PM, nop head wrote: > Maybe if the model doesn't change, only the camera angle, then a > render of the whole scene would be calculated slowly and then cached, > so after the first frame it would be fast. > > However a render with 10000 objects might take longer than the > universe will last. > > Lazy union would only be useful if you are doing F6 but for animation > you are only doing F5 and union is free for F5. > > On Wed, 1 Mar 2023 at 17:50, Jordan Brown > <openscad@jordan.maileater.net> wrote: > > On 3/1/2023 9:48 AM, jon wrote: >> No minkowski and no render.  Since I am only changing the camera >> view, render() might be useful, but I've never understood how to >> use it (only that the experts rave about it).  The model has >> perhaps 10,000 spheres in it.  It is art, not practical.  I >> downloaded the snapshot and will try the lazy unions later. > > Ah.  Yes, 10K of anything is a complex model. > > Some people like render().  I've found it useful for fixing one or > two kinds of preview artifacts, but not really otherwise.  Maybe I > don't have the right use cases or haven't seen the light. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Wed, Mar 1, 2023 11:59 PM

Yeah, lazy union won't help with preview, only with actual render.  Can't
you tell if OpenSCAD is busy by looking at CPU use?  Seems to me that you
really should bite the bullet and figure out how to make openscad compute
one frame.  Then you'll know exactly what's going on.  I am somewhat
puzzled about why this is complicated to do.  I took a look at the help
message and tried 'openscad -o test.png mymodel.scad' and it produced an
output image in test.png.

Jordan, my experience with render() was that it was crucially useful for
avoiding recomputes of minkowski() operations: it made iterating a minkowki
based design 100x faster in situations where the change didn't require the
minkowski to be recomputed.

On Wed, Mar 1, 2023 at 1:22 PM jon jon@jonbondy.com wrote:

Yes, I've not been brave enough to try an F6 again after it failed last
time.

Lazy union does not seem to be helping much with F5

Does anyone know how to tell if  OpenSCAD is busy animating or not in the
latest snapshot?  I have to set a 10 minute timer, and then come back and
see what it is doing.  Infuriating.

I hate being a leader.

Jon

On 3/1/2023 1:18 PM, nop head wrote:

Maybe if the model doesn't change, only the camera angle, then a render of
the whole scene would be calculated slowly and then cached, so after the
first frame it would be fast.

However a render with 10000 objects might take longer than the universe
will last.

Lazy union would only be useful if you are doing F6 but for animation you
are only doing F5 and union is free for F5.

On Wed, 1 Mar 2023 at 17:50, Jordan Brown openscad@jordan.maileater.net
wrote:

On 3/1/2023 9:48 AM, jon wrote:

No minkowski and no render.  Since I am only changing the camera view,
render() might be useful, but I've never understood how to use it (only
that the experts rave about it).  The model has perhaps 10,000 spheres in
it.  It is art, not practical.  I downloaded the snapshot and will try the
lazy unions later.

Ah.  Yes, 10K of anything is a complex model.

Some people like render().  I've found it useful for fixing one or two
kinds of preview artifacts, but not really otherwise.  Maybe I don't have
the right use cases or haven't seen the light.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Yeah, lazy union won't help with preview, only with actual render. Can't you tell if OpenSCAD is busy by looking at CPU use? Seems to me that you really should bite the bullet and figure out how to make openscad compute one frame. Then you'll know exactly what's going on. I am somewhat puzzled about why this is complicated to do. I took a look at the help message and tried 'openscad -o test.png mymodel.scad' and it produced an output image in test.png. Jordan, my experience with render() was that it was crucially useful for avoiding recomputes of minkowski() operations: it made iterating a minkowki based design 100x faster in situations where the change didn't require the minkowski to be recomputed. On Wed, Mar 1, 2023 at 1:22 PM jon <jon@jonbondy.com> wrote: > Yes, I've not been brave enough to try an F6 again after it failed last > time. > > Lazy union does not seem to be helping much with F5 > > Does anyone know how to tell if OpenSCAD is busy animating or not in the > latest snapshot? I have to set a 10 minute timer, and then come back and > see what it is doing. Infuriating. > > I hate being a leader. > > Jon > > > On 3/1/2023 1:18 PM, nop head wrote: > > Maybe if the model doesn't change, only the camera angle, then a render of > the whole scene would be calculated slowly and then cached, so after the > first frame it would be fast. > > However a render with 10000 objects might take longer than the universe > will last. > > Lazy union would only be useful if you are doing F6 but for animation you > are only doing F5 and union is free for F5. > > On Wed, 1 Mar 2023 at 17:50, Jordan Brown <openscad@jordan.maileater.net> > wrote: > >> On 3/1/2023 9:48 AM, jon wrote: >> >> No minkowski and no render. Since I am only changing the camera view, >> render() might be useful, but I've never understood how to use it (only >> that the experts rave about it). The model has perhaps 10,000 spheres in >> it. It is art, not practical. I downloaded the snapshot and will try the >> lazy unions later. >> >> >> Ah. Yes, 10K of anything is a complex model. >> >> Some people like render(). I've found it useful for fixing one or two >> kinds of preview artifacts, but not really otherwise. Maybe I don't have >> the right use cases or haven't seen the light. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
J
jon
Thu, Mar 2, 2023 12:18 AM

Adrian:

I have OpenSCAD running in Animation mode with the Dump Pictures option
enabled.  I am up to 68 out of 200 images with 4.5 hours of CPU time;
the process is up to a working set of 497K and private bytes of 677K.  I
will let it run over night.

I will try your command line use if my current run fails.  Last time I
made the mistake of trying to fill in a few of the missing frames using
a different release of OpenSCAD, and the resulting video was horrible. 
I don't know where the dimensions of the PNG come from, but they could
be the accident of how the screen is currently set up (running from the
GUI).

Thanks for your help!

Jon

On 3/1/2023 6:59 PM, Adrian Mariano wrote:

Yeah, lazy union won't help with preview, only with actual render. 
Can't you tell if OpenSCAD is busy by looking at CPU use?   Seems to
me that you really should bite the bullet and figure out how to make
openscad compute one frame.  Then you'll know exactly what's going
on.   I am somewhat puzzled about why this is complicated to do.  I
took a look at the help message and tried 'openscad -o test.png
mymodel.scad' and it produced an output image in test.png.

Jordan, my experience with render() was that it was crucially useful
for avoiding recomputes of minkowski() operations: it made iterating a
minkowki based design 100x faster in situations where the change
didn't require the minkowski to be recomputed.

On Wed, Mar 1, 2023 at 1:22 PM jon jon@jonbondy.com wrote:

 Yes, I've not been brave enough to try an F6 again after it failed
 last time.

 Lazy union does not seem to be helping much with F5

 Does anyone know how to tell if  OpenSCAD is busy animating or not
 in the latest snapshot?  I have to set a 10 minute timer, and then
 come back and see what it is doing.  Infuriating.

 I hate being a leader.

 Jon


 On 3/1/2023 1:18 PM, nop head wrote:
 Maybe if the model doesn't change, only the camera angle, then a
 render of the whole scene would be calculated slowly and then
 cached, so after the first frame it would be fast.

 However a render with 10000 objects might take longer than the
 universe will last.

 Lazy union would only be useful if you are doing F6 but for
 animation you are only doing F5 and union is free for F5.

 On Wed, 1 Mar 2023 at 17:50, Jordan Brown
 <openscad@jordan.maileater.net> wrote:

     On 3/1/2023 9:48 AM, jon wrote:
     No minkowski and no render. Since I am only changing the
     camera view, render() might be useful, but I've never
     understood how to use it (only that the experts rave about
     it).  The model has perhaps 10,000 spheres in it.  It is
     art, not practical.  I downloaded the snapshot and will try
     the lazy unions later.
     Ah.  Yes, 10K of anything is a complex model.

     Some people like render().  I've found it useful for fixing
     one or two kinds of preview artifacts, but not really
     otherwise.  Maybe I don't have the right use cases or haven't
     seen the light.
     _______________________________________________
     OpenSCAD mailing list
     To unsubscribe send an email to discuss-leave@lists.openscad.org


 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email todiscuss-leave@lists.openscad.org
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Adrian: I have OpenSCAD running in Animation mode with the Dump Pictures option enabled.  I am up to 68 out of 200 images with 4.5 hours of CPU time; the process is up to a working set of 497K and private bytes of 677K.  I will let it run over night. I will try your command line use if my current run fails.  Last time I made the mistake of trying to fill in a few of the missing frames using a different release of OpenSCAD, and the resulting video was horrible.  I don't know where the dimensions of the PNG come from, but they could be the accident of how the screen is currently set up (running from the GUI). Thanks for your help! Jon On 3/1/2023 6:59 PM, Adrian Mariano wrote: > Yeah, lazy union won't help with preview, only with actual render.  > Can't you tell if OpenSCAD is busy by looking at CPU use?   Seems to > me that you really should bite the bullet and figure out how to make > openscad compute one frame.  Then you'll know exactly what's going > on.   I am somewhat puzzled about why this is complicated to do.  I > took a look at the help message and tried 'openscad -o test.png > mymodel.scad' and it produced an output image in test.png. > > Jordan, my experience with render() was that it was crucially useful > for avoiding recomputes of minkowski() operations: it made iterating a > minkowki based design 100x faster in situations where the change > didn't require the minkowski to be recomputed. > > On Wed, Mar 1, 2023 at 1:22 PM jon <jon@jonbondy.com> wrote: > > Yes, I've not been brave enough to try an F6 again after it failed > last time. > > Lazy union does not seem to be helping much with F5 > > Does anyone know how to tell if  OpenSCAD is busy animating or not > in the latest snapshot?  I have to set a 10 minute timer, and then > come back and see what it is doing.  Infuriating. > > I hate being a leader. > > Jon > > > On 3/1/2023 1:18 PM, nop head wrote: >> Maybe if the model doesn't change, only the camera angle, then a >> render of the whole scene would be calculated slowly and then >> cached, so after the first frame it would be fast. >> >> However a render with 10000 objects might take longer than the >> universe will last. >> >> Lazy union would only be useful if you are doing F6 but for >> animation you are only doing F5 and union is free for F5. >> >> On Wed, 1 Mar 2023 at 17:50, Jordan Brown >> <openscad@jordan.maileater.net> wrote: >> >> On 3/1/2023 9:48 AM, jon wrote: >>> No minkowski and no render. Since I am only changing the >>> camera view, render() might be useful, but I've never >>> understood how to use it (only that the experts rave about >>> it).  The model has perhaps 10,000 spheres in it.  It is >>> art, not practical.  I downloaded the snapshot and will try >>> the lazy unions later. >> >> Ah.  Yes, 10K of anything is a complex model. >> >> Some people like render().  I've found it useful for fixing >> one or two kinds of preview artifacts, but not really >> otherwise.  Maybe I don't have the right use cases or haven't >> seen the light. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
RW
Rogier Wolff
Thu, Mar 2, 2023 8:43 AM

On Wed, Mar 01, 2023 at 06:18:04PM +0000, nop head wrote:

Maybe if the model doesn't change, only the camera angle, then a render of
the whole scene would be calculated slowly and then cached, so after the
first frame it would be fast.

I get it that caching is good. But a cache usually expires those
cached objects after they haven't been used for a while. I'd say that
you need to start expiring objects from the cache once you hit about
half the memory of the machine. Complaints about 32Gb would not
be coming in if that machine had 64Gb of memory.

Sidenote: e2fsck would "cache" some info about inodes. It did that
wrong, resulting in a quadratic algorithm that would also run out of
memory. It resulted in "extrapolations based on linear progress" of a
month runtime when it was a day in. I decided it would be faster to
investigate and fix the problem than to wait for it to finish. I was
correct. My fix eventually got included. Runtime reduced to a couple
of hours with my fix.

However a render with 10000 objects might take longer than the universe
will last.

What I don't understand is that openscad uses my graphiscs card for
rendering, right?

My graphics card is capable of doing on the order of 1 billion triangles
per second. so with 10000 objects, maybe 100000 triangles, it should
be capable of on the order of 1000 frames per second.

It is not optimally coded can be used to explain away one order of
magnitude, but not five.

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Wed, Mar 01, 2023 at 06:18:04PM +0000, nop head wrote: > Maybe if the model doesn't change, only the camera angle, then a render of > the whole scene would be calculated slowly and then cached, so after the > first frame it would be fast. I get it that caching is good. But a cache usually expires those cached objects after they haven't been used for a while. I'd say that you need to start expiring objects from the cache once you hit about half the memory of the machine. Complaints about 32Gb would not be coming in if that machine had 64Gb of memory. Sidenote: e2fsck would "cache" some info about inodes. It did that wrong, resulting in a quadratic algorithm that would also run out of memory. It resulted in "extrapolations based on linear progress" of a month runtime when it was a day in. I decided it would be faster to investigate and fix the problem than to wait for it to finish. I was correct. My fix eventually got included. Runtime reduced to a couple of hours with my fix. > However a render with 10000 objects might take longer than the universe > will last. What I don't understand is that openscad uses my graphiscs card for rendering, right? My graphics card is capable of doing on the order of 1 billion triangles per second. so with 10000 objects, maybe 100000 triangles, it should be capable of on the order of 1000 frames per second. It is not optimally coded can be used to explain away one order of magnitude, but not five. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
NH
nop head
Thu, Mar 2, 2023 8:56 AM

Yes it would be great if OpenSCAD expired old cache entries. If I work on a
complex model each F5 uses more and more memory until I either flush the
cache or restart and then it takes minutes to recreate the cached items
that are needed. It needs to record hits juring F5 and flush items that
have not been hit after a few F5s.

F5 time isn't taken up by drawing on the screen. It is mainly the time to
execute the statements for me. Once it is drawn I can pan and zoom it very
quickly with the mouse but animation always runs the entire script each
frame.

On Thu, 2 Mar 2023 at 08:44, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Wed, Mar 01, 2023 at 06:18:04PM +0000, nop head wrote:

Maybe if the model doesn't change, only the camera angle, then a render

of

the whole scene would be calculated slowly and then cached, so after the
first frame it would be fast.

I get it that caching is good. But a cache usually expires those
cached objects after they haven't been used for a while. I'd say that
you need to start expiring objects from the cache once you hit about
half the memory of the machine. Complaints about 32Gb would not
be coming in if that machine had 64Gb of memory.

Sidenote: e2fsck would "cache" some info about inodes. It did that
wrong, resulting in a quadratic algorithm that would also run out of
memory. It resulted in "extrapolations based on linear progress" of a
month runtime when it was a day in. I decided it would be faster to
investigate and fix the problem than to wait for it to finish. I was
correct. My fix eventually got included. Runtime reduced to a couple
of hours with my fix.

However a render with 10000 objects might take longer than the universe
will last.

What I don't understand is that openscad uses my graphiscs card for
rendering, right?

My graphics card is capable of doing on the order of 1 billion triangles
per second. so with 10000 objects, maybe 100000 triangles, it should
be capable of on the order of 1000 frames per second.

It is not optimally coded can be used to explain away one order of
magnitude, but not five.

     Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Yes it would be great if OpenSCAD expired old cache entries. If I work on a complex model each F5 uses more and more memory until I either flush the cache or restart and then it takes minutes to recreate the cached items that are needed. It needs to record hits juring F5 and flush items that have not been hit after a few F5s. F5 time isn't taken up by drawing on the screen. It is mainly the time to execute the statements for me. Once it is drawn I can pan and zoom it very quickly with the mouse but animation always runs the entire script each frame. On Thu, 2 Mar 2023 at 08:44, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Wed, Mar 01, 2023 at 06:18:04PM +0000, nop head wrote: > > Maybe if the model doesn't change, only the camera angle, then a render > of > > the whole scene would be calculated slowly and then cached, so after the > > first frame it would be fast. > > I get it that caching is good. But a cache usually expires those > cached objects after they haven't been used for a while. I'd say that > you need to start expiring objects from the cache once you hit about > half the memory of the machine. Complaints about 32Gb would not > be coming in if that machine had 64Gb of memory. > > Sidenote: e2fsck would "cache" some info about inodes. It did that > wrong, resulting in a quadratic algorithm that would also run out of > memory. It resulted in "extrapolations based on linear progress" of a > month runtime when it was a day in. I decided it would be faster to > investigate and fix the problem than to wait for it to finish. I was > correct. My fix eventually got included. Runtime reduced to a couple > of hours with my fix. > > > However a render with 10000 objects might take longer than the universe > > will last. > > What I don't understand is that openscad uses my graphiscs card for > rendering, right? > > My graphics card is capable of doing on the order of 1 billion triangles > per second. so with 10000 objects, maybe 100000 triangles, it should > be capable of on the order of 1000 frames per second. > > It is not optimally coded can be used to explain away one order of > magnitude, but not five. > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >