Well, more than 2 minutes is still long, and this morning, while
thinking about it during breakfast, I've found the clue : the number
of "price relationships" as explained in
http://groups.google.com/group/ledger-cli/msg/8158214761fcf1ef.

So I've tested:
1) downsizing my prices.db to one value per month
2) reporting only monthly or yearly

% time ledger reg -X € -J
2m07.451s
% time ledger reg -X € -J --price-db prices.db-monthly
  42.755s
% time ledger reg -X € -J -M
  34.802s
% time ledger reg -X € -J -M --price-db prices.db-monthly
  12.562s
% time ledger reg -X € -J -Y
   9.555s
% time ledger reg -X € -J -Y --price-db prices.db-monthly
   3.401s

% wc -l prices.db prices.db-monthly
 14804 prices.db
   963 prices.db-monthly

By reducing the number of registry lines to analyse (using --monthly=-
M or --yearly=-Y) *AND* by reducing the number of values in prices.db
files (by moving away from daily values to monthly values), the number
of "price relationships" is greatly reduced.
So, as "ledger reg -X € -J -M --price-db prices.db-monthly" is exactly
what I want, and 12 seconds is more than acceptable, I will consider
this thread as ended! ;-)

Thank you John for improvements and explanations

Thierry

Reply via email to