Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
perf: Asset Depreciations and Balances report #18455
This report took ~5 min to be generated and the server was unresponsive in the meantime.
Every category in the last year.
~1400 assets distributed among 76 assets categories with a total of ~243000 depreciation schedules.
I've converted the python logic to sql. Now, MariaDB returns all data almost ready to print.
Now, the report takes ~22 sec the first time it's executed and then, if you change the filters it takes ~1 sec. The server does not die.
Note: The report had a nested loop, it was doing some calculations for each schedule of each asset. Moreover, it was using
Info from comments in #17421
For the other comment, yes, there is the prepared report feature, I know it, but, with it, this report is still going to consume a lot of resources and is still going to demand a lot of time, but in the background. That's not a solution, it's like hiding the problem. And I'm not sure if it hides it completely, because it's probably that the server still freeze.