POV-Ray : Newsgroups : povray.general : SDL processing speed : Re: SDL processing speed Server Time
19 Apr 2024 11:54:45 EDT (-0400)
  Re: SDL processing speed  
From: clipka
Date: 22 Apr 2018 03:22:29
Message: <5adc3835$1@news.povray.org>
Am 21.04.2018 um 21:30 schrieb Alain:

> If you use any macro in a loop, it will get expanded and parsed each
> time it's used.
> 
> If that macro is in an include file, that file will get opened and read
> each time the macro is invoked.

As of v3.8.0-alpha, this is no longer true: Macros up to a certain size
(currently hard-coded to, IIRC, 64 kiB) are now cached in memory.

> EVERYTHING before the macro definition
> need to be read and skipped. Example : If you use any colour
> manipulation macro from colors.inc, they are located at the end, forcing
> the parser to read the whole include every time they are used.

That's not true even for v3.7 and earlier: The parser does remember the
offset of the macro within the include file, and jumps directly to that
offset when executing the macro.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.