[AWS] Non-lineal parsing time with Templates_parser

Alejandro. R. Mosteo Chagoyen A. R. Mosteo Chagoyen" <alejandro@mosteo.com
Fri, 6 Feb 2004 11:37:52 +0100


Hello, dear list members,

I'm using AWS with the useful templates parser to deliver some data
listings. However, I've noticed a great increase in response time as
the number of rows increases. At first I thought it was a normal
increase, but then I've made a simple test, parsing an almost empty
text file, which only contains:

@THING@ @THING@ @THING@ @THING@ @THING@ @THING@ @THING@ @THING@ @THING@

to spice things a bit.

@THING@ gets replaced with a moderately small string of about 40
characters.

I've measured the times to do the parsing and the results are:

Rows    Time
100     0,138
200     0,399
300     1,651
400     4,33
500     8,275
600     13,564
700     19,509
800     27,501
900     36,278
1000    48,189

Note that the vector creation is measured too and it never takes more
than 2,5 seconds, so the bunch of the computation is in the Parse
function from Templates_parser.

This is obviously non-linear and according to my excel almost
perfectly cuadratic. Note that the test is done with AWS 1.3, and thus
my questions are:

Someone knows the cause? Is it improved in AWS 1.4?

I'm going to profile the code right now, but just in case someone can
point me already in the good direction...

Kind regards,

----------------------------
Alejandro R. Mosteo Chagoyen
mailto:alejandro@mosteo.com
----------------------------