on 10/15/2000 4:23 AM, "Daniel L. Rall" <[EMAIL PROTECTED]> wrote:

> I'm curious why we need a pool of parsers.  This is something that I
> would be interested in implementing, if we really need it. :)
> 
>> From Parser.java:
> 
> /** 
> * The Runtime parser. This has to be changed to
> * a pool of parsers!
> */
> private static Parser parser;

The reason is MT issues. The Parser is syncronized and thus, only one
instance of parsing can be running at any one time. Having a pool would
allow us to have N number of parsers going at the same time. Note, I believe
this is just the initial parsing of the file into an AST, not the actual
execution of the AST. So, it really isn't a huge performance hit right now,
but will become one later as more and more people put load on Velocity.

-jon

-- 
http://scarab.tigris.org/    | http://noodle.tigris.org/
http://java.apache.org/      | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/       | http://www.sourcexchange.com/


Reply via email to