hledger/hledger-lib/Hledger
Simon Michael 00f22819ae balance report speedup
This refactoring fixes an O(n^2) slowdown in the balance command with
large numbers of accounts. It's now speedy, and the implementation is
clearer. To facilitate this, the Account type now represents a tree of
accounts which can easily be traversed up or down (and/or flattened
into a list).

Benchmark on a 2010 macbook:

    +-------------------------------------------++--------------+------------+--------+
    |                                           || before:      | after:     |        |
    |                                           || hledger-0.18 | hledgeropt | ledger |
    +===========================================++==============+============+========+
    | -f data/100x100x10.journal     balance    ||         0.21 |       0.07 |   0.09 |
    | -f data/1000x1000x10.journal   balance    ||        10.13 |       0.47 |   0.62 |
    | -f data/1000x10000x10.journal  balance    ||        40.67 |       0.67 |   1.01 |
    | -f data/10000x1000x10.journal  balance    ||        15.01 |       3.22 |   2.36 |
    | -f data/10000x1000x10.journal  balance aa ||         4.77 |       4.40 |   2.33 |
    +-------------------------------------------++--------------+------------+--------+
2012-10-21 17:18:18 +00:00
..
Data balance report speedup 2012-10-21 17:18:18 +00:00
Read support tilde (~) in journal and rules file paths 2012-05-30 08:36:01 +00:00
Utils make the utf8 IO compatibiity layer build on GHC 6.12.3, 7.0.4, 7.2.2, 7.4.1 2012-03-29 20:40:31 +00:00
Data.hs query cleanups 2012-05-17 16:02:22 +00:00
Query.hs combine command-line flags like --depth properly with non-flag query patterns 2012-06-29 22:36:30 +00:00
Read.hs web: don't auto-create a missing journal file at startup 2012-06-29 22:48:41 +00:00
Reports.hs balance report speedup 2012-10-21 17:18:18 +00:00
Utils.hs balance report speedup 2012-10-21 17:18:18 +00:00