|
![](/i/fill.gif) |
Lets start commenting on the discussion.
Rudy Velthuis wrote:
>
> Spider schrieb in Nachricht <36B7317E.4D09F18E@bahnhof.se>...
> >
> >
> >Rudy Velthuis wrote:
>
> >> But as the POV-team already mentioned somewhere, most time is not wasted
> in
> >> parsing, but in allocating objects during this process. If this is true
> (I
> >> can't verify it), the pre-compile wouldn't do a lot of good.
> >It depends on the scene, as far as I know. in some cases, I've spent a
> >lot of time waiting for a parse to finish. (take a look at the recursive
> >tree creation algorithms. Those are very long parsing, but not long if
> >declared as a .inc. (try the WinTrees if you like:-) it is from this
> >experience that I came with the idea.
>
> I'll have to take a look at the parser, but if this is true, then it's
> definitely not the allocation, which takes time, as obviously the result
> (the number of objects) would be exactly the same, so the number of
> allocations would be the same too.
Yes.
> Only difference is the fact, that WinTree does the recursion once (in Visual
> Basic),
*GASP*
Whatta heck are you accusing me of?
It is Delphi, admittedly using a very sloppy design, and rxlib, and
dElphi 3, but... "VISUAL BASIC" ????! *gasp* *choke*
> producing an include file with all objects already spelled out, and
> the recursive parser does this while parsing. So parsing is definitely the
> culprit here, not allocation.
Yes, it is. That's why I made the prog. the allocation takes around 4-8
seconds, depending on the size of the tree.
<snip>
>
> Perhaps there would be demand for a small program, which unravels #while
> loops and macros and creates (huge) include files out of them, taking a bit
> out of the parsing POV-Ray does. This could work like WinTree, but perhaps a
> bit more generalized. So the program would turn a:
>
> #declare Count = 0;
> #while (Count <= 40)
> sphere { <-1, Count, -1>, 1 }
> #declare Count = Count + 1;
> #end
>
> into:
> // #declare Count = 0;
> // #while (Count <= 40)
> sphere { <-1, 0, -1>, 1 }
> sphere { <-1, 1, -1>, 1 }
> sphere { <-1, 2, -1>, 1 }
> ...
> // #declare Count = Count + 1;
> // #end
> #declare Count = 40;
yes, this might be helpful, but perhaps not good enough. This is a thing
too look deper into.
> etc. (40 sphere definitions instead of one simple loop, and Count = 40, we
> might perhaps need this later on).
yes.
I'll go on commenting now :-)
//Spider
Post a reply to this message
|
![](/i/fill.gif) |