JournalReader performance bug #189

ronwalf opened this Issue May 14, 2014 · 3 comments


None yet

2 participants

ronwalf commented May 14, 2014

The 'ledgerDateSyntaxToTags' function in JournalReader.hs is quite slow, and the culprit seems to be regexReplaceBy. A recent profiling had it taking 31% of total cpu time and 27% of total allocation on a ~7k entry journal. Commenting that function out confirmed the performance gains in non-profiling build (3.3s with, 2.2s without).


Thanks for this report. Some questions: What command were you running ? How many occurences of the ledger date syntax ([DATE], [DATE=DATE2] or [=DATE2]) do you have in your posting comments ?

ronwalf commented Jul 6, 2014

I just used 'register' and 'balance' to test. I have zero occurrence of
the bracket syntax (I rarely use secondary dates, and I use the
PRIMARY=SECONDARY syntax when I do).


A bit faster now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment