Improving report performance

Robert Graham Merkel rgmerk@mira.net (Robert Graham Merkel)
Mon, 26 Feb 2001 23:48:44 +1100


Bill, 

It appears that the new report-generation code appends new html
elements to the end of scheme lists.  This is fine for short reports,
but it's obviously O(n^2) and thus it seems like it's a real performance
bottleneck for the transaction report, which can generate very large
html tables.

There are several ways we could get around this I can forsee:
replace the lists with a vector structure and use the "if it gets
full, double the size" trick, keep a reference to the end of the list
around and update that destructively, or even just store things in
reverse order and reverse things in the list before rendering the
particular element.

What do you think?

------------------------------------------------------------
Robert Merkel	                           rgmerk@mira.net

<telsa> I left my client on #gtk+ overnight and there was nothing 
in scrollback at all except quit/rejoins.
<bighead> telsa: well its been that for, I think 3 days now 
(ever since started coming back on IRC)
<telsa> Clearly they are busy implementing telepathy, 
and dog-fooding it. :) 
------------------------------------------------------------