POV-Ray : Newsgroups : povray.newusers : "include" file designs : Re: "include" file designs Server Time
4 Nov 2024 17:36:46 EST (-0500)
  Re: "include" file designs  
From: Will W
Date: 21 Feb 2003 14:34:26
Message: <3e567f42@news.povray.org>
Thanks to all for your input! It has been a very useful discussion.

To summarize: use of conditional inclusions can significantly reduce parsing
overheads when there is a certainty that the internal cross-coupling will
always work.

Thus

#ifndef (myStuffIncUniqueID)
    include "myStuff.inc"
#end

is useful in avoiding an unnecessary repeated load/parse so long as there is
a guarrantee that myStuff.inc contains a declaration

#declare myStuffIncUniqueID = someValue


So at a minimum, this is good with the standard includes that have a unique
declaration (seems like they all do) and with include files developed in
house, where there is absolute version control. It is also interesting that
this technique will fail gracefully: if the unique declaration in the
include file is changed at a later time, the pov file will still function--
it just won't be as efficient as it once was.

Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net


Post a reply to this message

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