qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Speed of execution


From: Per Bothner
Subject: Re: [Qexo-general] Speed of execution
Date: Wed, 15 Jan 2003 12:16:28 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

Eric Safern wrote:
With the full linux fortune data as its input (> 100,000 lines), the servlet takes 4 - 7 seconds on my test box, which strikes me as too long
for an impatient web surfer.  On a far smaller subset of data (4,000
lines), response time comes in at 1 - 2 seconds, which is still longer
than I'd like.

Are you using a servlet?  My guess is that the 1-2 seconds is
start-up time, and using a servlet can help with that, if you're
not already using it.

If you *are using a servlet, then the next step may be to pre-calculate
document("/var/www/html/fortunes.xml")/fortunes/address@hidden/cookie
for each $type, assuming there is only a small number of types.  You
could either save this in separate files, or do this pre-calculation
at server init type.  (The latter requires some Java programming,
or at least some Scheme programming, since I don't think you can
(currentlty do it in XQuery).  Or just pre-read the
document("/var/www/html/fortunes.xml") in the server init
code.

Of course it would also be useful to figure out where the time
is going on the big input file.  That may require some Java
profiling, which I don't any experience with.  What I could do
is just eye-ball the generated bytecode, though I don't know
when I'll have time.  (Well, eye-balling it shouldn't take long.
That may at least give us some ideas for potential improvements.
Improving the compiler may be harder to find the time for!)
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]