mbrav / formula-studio

A CMS for yoga and fitness studios for managing subscriptions, single visits and purchases. Written in Django.
GNU General Public License v3.0
2 stars 1 forks source link

Finance Stuff #7

Open mbrav opened 3 years ago

mbrav commented 3 years ago
AhmedAidarous commented 3 years ago

Hello, Where can i fork a copy of the report to polish it?

mbrav commented 3 years ago

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.

AhmedAidarous commented 3 years ago

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 commented 3 years ago

@mbrav Here is the folder: formula-studio/backend/api

AhmedAidarous commented 3 years ago

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.

AhmedAidarous commented 3 years ago

mbrav

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

mbrav commented 3 years ago

@AhmedAidarous Cool, thanks!