[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Calculation summary speed
From: |
Greg Chicares |
Subject: |
[lmi] Calculation summary speed |
Date: |
Mon, 23 Oct 2006 14:02:11 +0000 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Apparently we can produce the calculation summary faster by
conditionally restricting the size of the xml document that
contains the raw data. An extremely coarse sketch in terrible
style is shown at the bottom of this email.
That's just a very rough idea, of course. The reason for doing
something like this is that speed is one of our system's major
advantages compared to others, and we need to keep it as fast
as we possibly can. Using
File | New | Illustration
OK
as a test, here are some rough timings (in milliseconds):
total calculate prepare format
old: 175 150 0 25 no xslt: all C++
new: 950 150 300 500 current cvs
modified: 430 150 30 250 cvs + patch below
The "prepare" step became a decimal order of magnitude faster.
Let's try to find a way to make the "format" step dramatically
faster as well. That would be a big win. I'm not saying 250 ms
is an excessive price to pay for flexibility, but I'd much
rather pay less if at all possible.
In IllustrationView::SetLedger(), I tried this change:
ledger_formatter_.PrepareXmlDataForHtml();
- ledger_formatter_.PrepareXmlDataForTabDelimited();
but it seemed to have no effect. I'd guess the reason is that
they'd do they same thing at present, but lazy evaluation
prevents doing the same thing twice. And I suppose that would
affect only the "prepare" timing anyway, so it's probably
irrelevant.
Here's the patch I used--as mentioned above, it's intended only
as a demonstration that writing less data saves much time.
for
(double_vector_map_t::const_iterator j = double_vectors.begin()
;j != double_vectors.end()
;++j
)
{
value_id const & id = j->first;
+ if(light_version)
+ {
+ if
+ ( false
+ || (id.first == "Outlay" )
+ || (id.first == "AcctVal" )
+ || (id.first == "CSVNet" )
+ || (id.first == "EOYDeathBft" )
+ || (id.first == "AcctVal" )
+ || (id.first == "CSVNet" )
+ || (id.first == "EOYDeathBft" )
+ )
+ {
+ // Okay--column needed for calculation summary.
+ }
+ else
+ {
+ continue;
+ }
+ }
if ( formatter.has_format( id.first ) )
- [lmi] Calculation summary speed,
Greg Chicares <=