hledger/hledger-ui
Stephen Morgan 5e7b69356f lib: Change internal representation of MixedAmount to use a strict Map
instead of a list of Amounts. No longer export Mixed constructor, to
keep API clean (if you really need it, you can import it directly from
Hledger.Data.Types). We also ensure the JSON representation of
MixedAmount doesn't change: it is stored as a normalised list of
Amounts.

This commit improves performance. Here are some indicative results.

hledger reg -f examples/10000x1000x10.journal
- Maximum residency decreases from 65MB to 60MB (8% decrease)
- Total memory in use decreases from 178MiB to 157MiB (12% decrease)

hledger reg -f examples/10000x10000x10.journal
- Maximum residency decreases from 69MB to 60MB (13% decrease)
- Total memory in use decreases from 198MiB to 153MiB (23% decrease)

hledger bal -f examples/10000x1000x10.journal
- Total heap usage decreases from 6.4GB to 6.0GB (6% decrease)
- Total memory in use decreases from 178MiB to 153MiB (14% decrease)

hledger bal -f examples/10000x10000x10.journal
- Total heap usage decreases from 7.3GB to 6.9GB (5% decrease)
- Total memory in use decreases from 196MiB to 185MiB (5% decrease)

hledger bal -M -f examples/10000x1000x10.journal
- Total heap usage decreases from 16.8GB to 10.6GB (47% decrease)
- Total time decreases from 14.3s to 12.0s (16% decrease)

hledger bal -M -f examples/10000x10000x10.journal
- Total heap usage decreases from 108GB to 48GB (56% decrease)
- Total time decreases from 62s to 41s (33% decrease)

If you never directly use the constructor Mixed or pattern match against
it then you don't need to make any changes. If you do, then do the
following:

- If you really care about the individual Amounts and never normalise
  your MixedAmount (for example, just storing `Mixed amts` and then
  extracting `amts` as a pattern match, then use should switch to using
  [Amount]. This should just involve removing the `Mixed` constructor.
- If you ever call `mixed`, `normaliseMixedAmount`, or do any sort of
  amount arithmetic (+), (-), then you should replace the constructor
  `Mixed` with the function `mixed`. To extract the list of Amounts, use
  the function `amounts`.
- If you ever call `normaliseMixedAmountSquashPricesForDisplay`, you can
  replace that with `mixedAmountStripPrices`. (N.B. this does something
  slightly different from `normaliseMixedAmountSquashPricesForDisplay`,
  but I don't think there's any use case for squashing prices and then
  keeping the first of the squashed prices around. If you disagree let
  me know.)
- Any remaining calls to `normaliseMixedAmount` can be removed, as that
  is now the identity function.
2021-05-01 09:45:29 -10:00
..
Hledger lib: Change internal representation of MixedAmount to use a strict Map 2021-05-01 09:45:29 -10:00
test ui: add tests for query filtering (#1523) 2021-04-12 12:58:51 -10:00
.date.m4 ;update manuals 2021-03-18 07:22:42 -07:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version ;bump version to 1.21.99 2021-03-10 13:50:49 -08:00
.version.m4 ;bump version to 1.21.99 2021-03-10 13:50:49 -08:00
CHANGES.md ;finalise changelogs 2021-03-10 11:10:13 -08:00
hledger-ui.1 ;update manuals 2021-03-18 07:22:42 -07:00
hledger-ui.cabal ;update cabal files 2021-04-04 08:03:57 -10:00
hledger-ui.hs ui: work around ghc 9.0 build failure (#1503) 2021-04-06 07:45:49 -10:00
hledger-ui.info ;update manuals 2021-03-18 07:22:42 -07:00
hledger-ui.m4.md ;doc: ui, web: make image paths absolute 2021-03-21 09:10:50 -07:00
hledger-ui.txt ;update manuals 2021-03-18 07:22:42 -07:00
LICENSE ui: revive the curses UI, now named hledger-ui 2015-08-13 11:22:40 -07:00
package.yaml drop support for GHC 8.0 2021-04-04 07:54:22 -10:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs ui: revive the curses UI, now named hledger-ui 2015-08-13 11:22:40 -07:00

hledger-ui

A simple curses-style text user interface for the hledger accounting system. It can be a more convenient way to browse your accounts than the CLI. This package currently does not support Microsoft Windows, except in WSL.

See also: the project README and home page.