New issue 191: beancount.core.Inventory should be a dict when Costs have dates
https://bitbucket.org/blais/beancount/issues/191/beancountcoreinventory-should-be-a-dict

Jason Chu:

The claim in 
https://bitbucket.org/blais/beancount/src/621cec5ed38bcd128a3502a3b5c367f283deffe2/beancount/core/inventory.py?at=default&fileviewer=file-view-default#inventory.py-58
 doesn't hold up anymore. Any account where you buy small amounts of a 
commodity will expand the list of positions indefinitely because each Cost 
object will be unique.

Most of the computational pain happens in add_amount 
(https://bitbucket.org/blais/beancount/src/621cec5ed38bcd128a3502a3b5c367f283deffe2/beancount/core/inventory.py?at=default&fileviewer=file-view-default#inventory.py-365)
 when iterating over a list of positions that usually don't match (unless 
reducing).

I have a hack that proves it too. The original code (when rendering the fava 
balance sheet) takes about 3 seconds to render net worth and a balance tree, 
with the hack applied it takes about 2 seconds.


-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20170911032903.19981.5355%40celery-worker-108.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to