"Redbeard" <red### [at] wv adelphia net> wrote in message
news:3be8b2d5@news.povray.org...
>
[snip]
>
> I would say, yes, include files would be optomized as well. I've recently
been
> thinking about this as well. That started when I learned that #include'd
macros
> open the include file each time the macro is called.
>
> A good way is to parse an included file and keep the parsed file in memory for
> the entire execution. When a macro is read it would be parsed into bytecode
and
> stored in memory. An index to it would be stored and anytime the macro is
> encountered in the following code the bytecode is looked up and executed. No
> need to open the included file again.
>
[snip]
I think an exception should be made for mesh includes though eh? They are
already referenced similar to your description (if I understand correctly) as
objects and I wouldn't really want the include text hanging around in memory any
longer than necessary, considering the size they can achieve. ( And of course
I'm not referring to includes that generate meshes algorithmically)
Batronyx ^"^
Post a reply to this message
|