Comments on ECS perfermance:

Servlets are relatively long-lived and create and destroy numerous
objects. This is expensive. If you can reduce these numbers, it is a
Good Thing(tm). Now, instead of always new'ing ECS objects, how about
caching ecs objects? Use a factory class which manages a cache of ecs
objects, explicitly calling factory.destroy(ecs_object) which makes
the object available to the cache once again. It would be useful if
all ecs objects had some sort of 'init()' method which would reset all
the values to the defaults (i am behind the times: i am not sure if
this init() method exists...), as you have to watch out that the
cached objects do not carry anything unwanted along with them... 

i might be willing to write this caching class (es?) if someone were to
add this init method to ecs...

-glen



> Derek Scherger wrote:
> 
> > Hi folks, I've just recently downloaded ECS and started trying to use it
> > as a cleaner alternative to what is going to be some really ugly JSP
> > code, and my first impressions are very good. It is so much cleaner than
> > JAVA embedded in HTML (JSP) or HTML embedded in JAVA
> > (out.println("<TAG>") that I'm all but sold.
> >
> > Here's the catch...
> >
> > We're generally quite concerned with the performance of our applications
> > and new technologies don't generally get the nod unless they compare
> > reasonably well with old ones. At the moment, I'm testing ECS against
> > some functionally similar JSP code to generate a somewhat large table
> > (1000 rows by 10 columns) and JSP is about 10x faster, which is going to
> > make ECS a really hard sell.
> >
> 
> Sounds about right.  htmlKona is about 2x to 3x faster then ECS.  I would expect
> jsp to be even faster as it doesn't generate any html from objects, they are
> always just strings.  And doing a println("<sometag here>") is going to be faster
> then calling output or to string on an ecs object.  I would welcome in
> performance improvements.
> 
> >
> > First thoughts on this problem were that the number of objects being
> > instantiated for this table, on the order of 10,000 or so, was likely a
> > big part of the problem.
> 
> modern vm's do this really well.
> 
> > However, a simple test shows that the output or
> > actual generation of the HTML takes far longer than instantiating the
> > required ECS objects, something like 10x longer generating than
> > instantiating.
> >
> 
> Sounds about right modern vm's handle object creation and distruction realitivly
> well.
> 
> >
> > So, first question: does this sound reasonable?
> >
> > And, second question: how can I improve the HTML generation time by a
> > factor of 10 or so?
> >
> 
> Some things to check that will impact performance are filtering & prettyprinting,
> they should be turned off. I don't think you will be able to get a 10x
> improvment.  The ecs core is pretty solid at this point and there aren't any
> glaringly obvious performance bottlenecks. You might get lucky and improve the
> speed by 2x or 3x.  If you are able to get any performance increases from the
> core, send me a patch and I will happily add them.
> 

stuff deleted......


--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to