fava-portfolio-returns icon indicating copy to clipboard operation
fava-portfolio-returns copied to clipboard

investigate page load performance

Open andreasgerstmayr opened this issue 2 years ago • 1 comments

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 avatar Sep 03 '23 21:09 andreasgerstmayr

@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 😕

andreasgerstmayr avatar Sep 03 '23 21:09 andreasgerstmayr

This should not happen with the latest version, as all data is fetched async from the UI.

andreasgerstmayr avatar Feb 08 '25 22:02 andreasgerstmayr