On Fri, Feb 16, 2001 at 10:03:19AM -0800, John McNally wrote:
> Santiago Gala wrote:
> >
> > While working on a patch to simplify current Jetspeed code, two ideas
> > came up on me:
> >
> > 1- DynamicURI is a strong candidate for pooling instances, since it
> > should be heavily used under most setups (typically, we have more than
> > five per request, and they are instantiated afresh in every request). I
> > imagine you have already considered this object.
> >
>
> It is at least as good a candidate as the ParameterParser. I think
> DynamicURI should be made an interface. DynamicURI/ParameterParser
> paired implementations could then be used to alter the
> uri format that we currently use. Not that I feel our implementation
> needs improvement per se, but I have seen others such as what's in Tea
> that might be of interest.
Agreed, +1 on pooling both DynamicURI and ParameterParser instances.
And making them both interfaces with pluggable implementations is
certainly an interesting idea...
> > 2- It could give an efficience boost if we could change the way it is
> > used. Instead of returning it as a String, we could have something like
> > dynuri.write( data.getWriter() ); , writing it straight into the
> > response. This would save some StringBuffer and String instantiations
> > ---> less garbage ---> better memory efficience again.
> >
> > I don't know if this second idea is feasible to implement with
> > templating engines like velocity, jsp taglibs or the pull approach. So I
> > wanted, before doing further experiments, to know what do you experts
> > think about it. :-?
> >
> > Looks promising?
>
> It might be worth exploring, but I can not say immediately that it will
> lead to something workable in a general sense. There are potentially a
> lot of other Object.toString() operations occuring during a velocity/jsp
> template parsing, so it would find most of its benefit in applications
> with not so much dynamic content, which are likely to not need the
> efficiency. Of course you could carry this on to other Objects as
> well. So again it is worth a look.
I personally can't see a big gain from this for the reasons you give
John. Although I'd be happy to be wrong... :-)
--
Sean Legassick
[EMAIL PROTECTED]
Jeg er mann: Ingenting menneskelig er fremmed for meg
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]