-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization and performance improvements #14
Comments
This is a screenshot of a performance report made using Blackfire, with a set of ~100000 transactions (60000 purchases, 25000 sales and 15000 expenses, with 100 different cryptocurrencies). 86% of the time is taken by the initial parsing and computation made on the transactions file. The Concerning the loading time required by PhpSpreadsheet, we need to check if we can improve something, or we could at least, during the first request, save the array in a faster readable format (JSON? serialize?) for the following requests. |
Using the same input file as before, just parsing from CSV to array takes about 6.5 seconds on my laptop. Saving the array to a json file doesn't take any significant additional time. Successive reads of the array from the json file only take about 0.1 seconds, so this is definitely a change to make. Encryption and decryption with AES does not seem to affect the loading time significantly, so the json file can be encrypted with the same key as the source file, before being saved. |
Currently, processing reports with several thousand transactions takes many seconds.
There are definitely functions that are executed several times unnecessarily, and values that could be cached.
It is necessary to review which functions are the most computationally heavy and improve and/or cache them.
The text was updated successfully, but these errors were encountered: