POV-Ray : Newsgroups : povray.advanced-users : macro question : Re: macro question Server Time
5 Jul 2024 15:56:43 EDT (-0400)
  Re: macro question  
From: Jim Charter
Date: 27 Mar 2008 01:33:47
Message: <47eb3fcb$1@news.povray.org>
Alain wrote:

> When you use a macro from an #include, that file is loaded every time 
> the macro is parsed. Open the file, read from the file, close the file. 
> This take time, even if the file is cached in memory.
> It would be beter is you put that macro into your code, or at least, in 
> the same file as the calling macro.
> #Called_Macro[macro stuff]
> #Calling_Macro[some macro stuff..Called_Macro(...)..more macro stuff}
> 

Yes, in my case I want to use the Colefax spline macros which are 
packaged as an include file.  The macros are called mega times to 
retrieve spline points and build a mesh.  If I cut and paste the macros 
into my include file which contains my macros which call them, I cut the 
parse time by a factor of four or five.  If I leave them in their own 
include file, the parse time is degraded no matter where I insert the 
#include statement.


Post a reply to this message

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