POV-Ray : Newsgroups : povray.general : A couple parser performance issues/optimizations. : Re: A couple parser performance issues/optimizations. Server Time
19 May 2024 05:53:34 EDT (-0400)
  Re: A couple parser performance issues/optimizations.  
From: Bald Eagle
Date: 11 Oct 2017 08:00:00
Message: <web.59de07b831ae2f12c437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:


> Parsing a loop... well, it /could/ be reasonably easy if the parser
> pre-processed the content somehow (e.g. discarding any comments,
> identifying keywords, and some such), and on each loop iteration only
> traversed the pre-processed stuff. Unfortunately, POV-Ray's organically
> grown syntax is quite detrimental to such an approach.

I wasn't limiting my inquiry to loops - the parsing phase just always seemed to
be an unusually / unexpectedly slow thing.

Now, I understand that there are a lot of things that take place under the hood,
with lots of moving parts, and take place in ways I don't understand.
But it seems to me that the scene text is already "pre-processed" to a certain
degree - since we have real-time context-sensitive color coding.
There's also plenty of time where the bulk of the text just sits there unedited
while the user works on other parts of the scene or scrolls through re-reading
it.   I realize that this text is likely unsaved, prone to editing, etc. and the
editor is not the parser....
And that the parser necessarily (?) is limited to a single core, since the scene
needs to be parsed in a linear manner.
Perhaps something needs to be added to the language that makes multi-core
parsing possible, if the SDL is written properly.
#subsection 1
 ....
#end

#subsection 2
 ....
#end
Just food for thought for future developments.

Then there is the loop - which is how we got here in the first place.
The loop gets parsed the first time - so perhaps there is a way for the [future]
parser to process the loop content on that first pass

> > <Gollum> Clipka hates the parser, yes he does, my Precioussssssss  <Gollum>
>
> Oh yes, we does, doesn't we, my precioussss? Oh yes, we loathes it!
>
> It's not tasty... it's not scrumptious... no, preciousssss! Not at all
> scrumptious! Nassssty parsers!

It burns us!!!


Post a reply to this message

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