POV-Ray : Newsgroups : povray.beta-test : Cached Macros! : Cached Macros! Server Time
17 Apr 2024 23:41:05 EDT (-0400)
  Cached Macros!  
From: clipka
Date: 14 Jul 2016 19:15:19
Message: <57881d07$1@news.povray.org>
Hi Folks,

Until now, each and every invocation of a macro from a file other than
the one it was declared in, inevitably caused the latter file to be
opened again for the macro code to be re-read -- a process that
seriously bogged down the parser. It therefore used to be recommended to
copy frequently used macros into the main scene file (or whatever file
they were called from).

I have now implemented a mechanism that keeps a copy of each and every
macro's code in memory (except for macros more than 65536 characters in
size), greatly increasing the execution speed of macros in such
scenarios, to the point that said recommendation should be obsolete from
now on.


While I'm satisfied with the cross-file macro execution speed, I would
like additional feedback from you guys about execution speed of macros
declared in the same file. I see a slight increase there, too -- can you
confirm?

Also, I'd like you folks to go wild trying to find scenarios where the
caching of macros has any drawbacks, and of course find that one bug I
have hidden there.


As usual, both Windows binaries and source code packages can be found at
https://github.com/POV-Ray/povray/releases. The source code can also be
found as the current master branch at https://github.com/POV-Ray/povray.

(The source code in question carries the version number
v3.7.1-alpha.8697421, the Windows binaries carry the build suffix +av151.)


Post a reply to this message

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