You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Emilio Maldonado <em...@cisco.com> on 2001/03/23 21:32:34 UTC

ESQL performance: other alternatives?

Hi, I have a small system running with Cocoon

XML --> XSP (esql, xinclude,etc) --> XSL --> HTML

My problem is that responses take 10-15 seconds per page.
I have isolated the layers and esql execution is the most expensive. What is
happening is that I'm executing several queries - the XSP does that
sequentially -and then the XSL is applied. Even simple queries returning a
few rows take several seconds. Performing the same queries using jdbc and
java code is much faster.

So decided to eliminate esql, I implemented JDBC code and called it from the
XSP; the time is better but is still slow since the queries are sequentially
in the xsp; besides when I get the results they're recognized by the XSL as
lt;ROWgt;  instead of <ROW> <colData1> etc..

Then, I'd like to explore the following option
- Maybe implementing my own producer and multi-threading the query
executions? but in that case I'd need my producer to read the XML file,
parse it manually using java code and then return the chunk of resulting XML
indicating the stylesheet? is this a good approach or I might consider
something else?

Suggestions would be really really appreciated. Thanks!
Emilio


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: ESQL performance: other alternatives?

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 23 Mar 2001, Emilio Maldonado wrote:

> Hi, I have a small system running with Cocoon
>
> XML --> XSP (esql, xinclude,etc) --> XSL --> HTML
>
> My problem is that responses take 10-15 seconds per page.
> I have isolated the layers and esql execution is the most expensive. What is
> happening is that I'm executing several queries - the XSP does that
> sequentially -and then the XSL is applied. Even simple queries returning a
> few rows take several seconds. Performing the same queries using jdbc and
> java code is much faster.

something is going wrong then - esql code should not be significantly
slower than issuing jdbc statements directly. would you mind posting your
xml page for my edification?

- donald


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: ESQL performance: other alternatives?

Posted by JP Moresmau <jp...@dol.ie>.
Are you using connection pooling? The most expensive part of a JDBC
operation is usually connecting to the database. In Cocoon 1.x, use the
Turbine Connection Pool (you can configure it in your cocoon.properties
file). Having looked at the esql, I don't really see what could cause the
code to be slower than handcrafted JDBC. Unless you want to put a sample
query, so we could see what could be slow in the esql-generated JDBC code?
What database and driver are you using?

JP


At 12:32 23/03/2001 -0800, you wrote:
>Hi, I have a small system running with Cocoon
>
>XML --> XSP (esql, xinclude,etc) --> XSL --> HTML
>
>My problem is that responses take 10-15 seconds per page.
>I have isolated the layers and esql execution is the most expensive. What is
>happening is that I'm executing several queries - the XSP does that
>sequentially -and then the XSL is applied. Even simple queries returning a
>few rows take several seconds. Performing the same queries using jdbc and
>java code is much faster.
>
>So decided to eliminate esql, I implemented JDBC code and called it from the
>XSP; the time is better but is still slow since the queries are sequentially
>in the xsp; besides when I get the results they're recognized by the XSL as
>lt;ROWgt;  instead of <ROW> <colData1> etc..
>
>Then, I'd like to explore the following option
>- Maybe implementing my own producer and multi-threading the query
>executions? but in that case I'd need my producer to read the XML file,
>parse it manually using java code and then return the chunk of resulting XML
>indicating the stylesheet? is this a good approach or I might consider
>something else?
>
>Suggestions would be really really appreciated. Thanks!
>Emilio
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>
> 

JP Moresmau
http://frenchstud.io

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>