Open mbrav opened 3 years ago
Hello, Where can i fork a copy of the report to polish it?
Hi @AhmedAidarous , thanks for checking in! Currently, there is not much of what you could call "reports". For now, what I have in the models are very inefficient queries that probably need some redesigning. In models.py
in App/
I have loops like this, this, this, and this. All this probably has to be reimplemented in another way, since, while it is ok for a small database, it will be quite catastrophic performance-wise if the db gets bigger, I imagine.
Overall, this project is on the backburner a bit, but I will pick it up and start working on it full pace soon while I am taking a course in backend development. But feel free to fork and contribute, would be very appreciated! Let me know what you need, I could give rights to edit the projects, if you want.
Hello @mbrav Goodluck on the backend development course , yeah im very interested in contributing to this project. I might be able to help you out with sorting the loops and reimplement them :)
Also just wanted to clarify, where are the loops exactly? I couldn't find a models.py. If you can specify the directory that would be awesome :).
@mbrav Here is the folder: formula-studio/backend/api
Hello @mbrav I have found a few ways I can speed up the models.py file, and reduce the time complexity of your code. From what I can tell this should make a difference in processing time, and will allow it to run at a good pace as the database gets bigger.
Hello, I've been working on the file for a bit now, and I think I managed to increase the speed performance of the models.py file. I took the problem you mentioned which was the for loops being this after this, and instead replaced them with reduction operations and mapping functions. Which doing research shows yield much faster results than using for loops of up to x2 - x4 times. Don't be fooled, as there is more code written, but logically it should run way way faster. Fast enough for the program to not be problematic as you said when the database gets larger. Im going to commit my changes back to the repo now
@AhmedAidarous Cool, thanks!
django-admin-charts
?