andreasgerstmayr / fava-portfolio-returns

fava-portfolio-returns shows portfolio returns in Fava
GNU General Public License v2.0
38 stars 2 forks source link

investigate page load performance #4

Open andreasgerstmayr opened 1 year ago

andreasgerstmayr commented 1 year ago

There is sometimes a bit of a delay in loading the fava top level view on start-up. Is that possibly due to the compute_returns function taking a while to work through my ledger's history? There's nothing in the logs when this delay happens, but if I disable your plugin the top level page loads right away on start-up.

Originally posted by @michaelMinar in https://github.com/andreasgerstmayr/fava-portfolio-returns/issues/2#issuecomment-1693888777

andreasgerstmayr commented 1 year ago

@michaelMinar The Fava page at /beancount/income_statement/ is loaded slower than usual if this extension is enabled?

That's odd, afaics the code to scan the ledger and compute the returns should only be called if the extension page (/beancount/extension/FavaPortfolioReturns/) is opened 😕