Go to file
Simon Michael c23fc8b671 speed up -V/--value by converting reports, not the journal (#999)
Instead of converting all journal amounts to value early on, we now
convert just the report amounts to value, before rendering.

This was basically how it originally worked (for the balance command),
but now it's built in to the four basic reports used by print,
register, balance and their variants - Entries, Postings, Balance,
MultiBalance - each of which now has its own xxValue helper.

This should mostly fix -V's performance when there are many
transactions and prices (the price lookups could still be optimised),
and allow more flexibility for report-specific value calculations.

+------------------------------------------++-----------------+-------------------+--------------------------+
|                                          || hledger.999.pre | hledger.999.1sort | hledger.999.after-report |
+==========================================++=================+===================+==========================+
| -f examples/1000x1000x10.journal bal -V  ||            1.08 |              0.96 |                     0.76 |
| -f examples/2000x1000x10.journal bal -V  ||            1.65 |              1.05 |                     0.73 |
| -f examples/3000x1000x10.journal bal -V  ||            2.43 |              1.58 |                     0.84 |
| -f examples/4000x1000x10.journal bal -V  ||            4.39 |              1.96 |                     0.93 |
| -f examples/5000x1000x10.journal bal -V  ||            7.75 |              2.99 |                     1.07 |
| -f examples/6000x1000x10.journal bal -V  ||           11.21 |              3.72 |                     1.16 |
| -f examples/7000x1000x10.journal bal -V  ||           16.91 |              4.72 |                     1.19 |
| -f examples/8000x1000x10.journal bal -V  ||           27.10 |              9.83 |                     1.40 |
| -f examples/9000x1000x10.journal bal -V  ||           39.73 |             15.00 |                     1.51 |
| -f examples/10000x1000x10.journal bal -V ||           50.72 |             25.61 |                     2.15 |
+------------------------------------------++-----------------+-------------------+--------------------------+

There's one new limitation, not yet resolved: -V once again can pick a
valuation date in the future, if no report end date is specified and
the journal has future-dated transactions. We prefer to avoid that,
but reports currently are pure and don't have access to today's date.
2019-04-23 17:39:01 -07:00
.github ;fix pull request template link; comment the help text 2019-03-07 11:36:15 -08:00
.sandstorm Add --capabilities-header to launcher.sh 2018-06-24 17:44:22 +02:00
bin smooth: smoothes out irregular transactions (experimental addon) 2018-07-16 23:36:06 +01:00
checks update dev setup tests 2015-03-16 17:59:06 -07:00
doc fix link to auto postings 2019-03-26 14:37:15 -07:00
docker package: added helper scripts in docker/ 2019-01-31 12:44:12 -08:00
examples tests: update i18n test journals, i18n tests 2019-04-20 08:34:08 -07:00
hledger speed up -V/--value by converting reports, not the journal (#999) 2019-04-23 17:39:01 -07:00
hledger-api ; propagate dev version bump 2019-03-20 17:13:59 -07:00
hledger-install install: bump versions 2019-03-20 16:18:04 -07:00
hledger-lib speed up -V/--value by converting reports, not the journal (#999) 2019-04-23 17:39:01 -07:00
hledger-ui ; ui: changelog from 1.14.2 2019-03-20 17:49:22 -07:00
hledger-web ; propagate dev version bump 2019-03-20 17:13:59 -07:00
shell-completion Update demonstration video 2019-02-16 06:52:21 -08:00
site ;site: update cookbook links 2019-04-06 14:00:04 -07:00
tests speed up -V/--value by converting reports, not the journal (#999) 2019-04-23 17:39:01 -07:00
tools tools: generatejournal: start from a fixed year, not last year 2019-04-20 08:30:56 -07:00
.appveyor.yml appveyor: note 7z docs 2019-03-09 17:43:54 -08:00
.ci .ci: track generated md files as well 2018-05-21 08:35:49 -07:00
.ctags tools: remove some more hakyll-std traces 2018-05-09 10:20:21 -07:00
.dockerignore package: added Dockerfile 2019-01-29 16:14:03 -08:00
.editorconfig fix datepicker not closing, linting 2017-12-30 13:44:40 -05:00
.ghci tools: .ghci file to control prompt 2017-03-29 14:43:00 -07:00
.gitignore Add upper bound on 'statistics'; broaden .gitignore 2018-10-22 09:51:02 -07:00
.hlint.yaml refactor: lib: hlint cleanups 2019-02-14 05:15:49 -08:00
.mailmap doc: use consistent spelling of Mykola Orliuk 2017-03-27 05:47:15 -07:00
.travis-maybe-skip.sh tools: travis: note occasional breakage on PRs 2017-10-16 08:03:43 -07:00
.travis.yml travis: enable web, api 2019-03-09 17:13:58 -08:00
.version bump version to 1.13 2019-02-01 17:19:19 -08:00
azure-pipelines.yml ci: azure: try without display names 2019-02-02 12:55:12 -08:00
bench.sh tools: make bench: disable slowest 10k-txn benchmarks by default 2017-12-05 14:38:55 -08:00
cabal-install.sh cabal-install: do a cabal update 2018-02-16 23:11:10 -08:00
cabal.project disregard over-specified version constraints in brick and config-ini 2018-10-24 10:37:28 -07:00
CHANGES.md ; merge latest changelogs 2019-03-20 16:18:04 -07:00
CONTRIBUTING.md doc: add a README for the functional tests, linked from contrib guide 2019-04-19 09:56:33 -07:00
dev.hs collect some langage pragmas in dev.hs 2019-02-20 18:08:33 -08:00
Dockerfile docker: use "haskell" image as base 2019-03-14 16:34:56 -07:00
LICENSE add LICENSE 2008-10-01 07:52:07 +00:00
Makefile make: use profiterole, not profiteur 2019-04-20 09:25:36 -07:00
Makefile.helpsys make: rename sub-makefiles; start moving site script to make/shake 2019-03-05 18:43:04 -08:00
README.md doc: fix readme markdown formatting on github 2017-10-31 12:03:26 -07:00
Shake.hs ; shake comment 2019-03-21 10:23:41 -07:00
stack-ghc7.10.yaml roi: use math-functions lib instead of old statistics version 2018-12-03 15:51:29 -08:00
stack-ghc8.0.yaml ui: fix build issues with older brick/snapshots, require brick 0.23+ 2019-02-01 21:05:56 -08:00
stack-ghc8.2.yaml stack: use latest easytest 0.2.1 with all GHCs 2018-10-24 12:41:08 -07:00
stack-ghc8.4.yaml stack: use latest easytest 0.2.1 with all GHCs 2018-10-24 12:41:08 -07:00
stack.yaml bump default stack.yaml to nightly-2019-03-09 / ghc 8.6.4 2019-03-09 15:27:34 -08:00

hledger

lightweight, portable, dependable accounting tools

hledger is a computer program for easily tracking money, time, or other commodities, on unix, mac and windows (and web-capable mobile devices, to some extent).

It is first a command-line tool, but there are also curses-style and web interfaces, and a Haskell library (http://hackage.haskell.org/package/hledger-lib) for building your own programs and scripts (hledger is written in Haskell). hledger was inspired by and is largely compatible with Ledger. hledger is free software available under the GNU General Public License v3+.

hledger aims to help both computer experts and regular folks to gain clarity and control in their finances and time management, but currently it is a bit more suited to techies. I use it every day to:

  • track spending and income
  • see time reports by day/week/month/project
  • get accurate numbers for client billing and tax filing
  • track invoices

Though limited in features, hledger is lightweight, usable and reliable. For some, it is a simpler, less distracting, more future-proof alternative to Quicken or GnuCash.

For more, see http://hledger.org.

Support

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

license

OpenCollective OpenCollective bountysource github issues

on hackage on stackage nightly on stackage lts on stackage lts 7

travis build status appveyor windows build status