Click here to Skip to main content
15,888,610 members

Comments by Mohamad Shoumar (Top 7 by date)

Mohamad Shoumar 18-Aug-23 7:08am View    
okay so I'll tell the manager that I have no prior experience regarding the backend, the design will be ready in 2 days but I need to work a couple of days on the backend refactoring to give you an estimate
Mohamad Shoumar 18-Aug-23 6:52am View    
Like I can easily estimate the time for designing the pages, probably 1-2 days, but the issue is that the backend has no API's, just a bunch of python files written in oop and are all connected to the main.py script which you run in the terminal. I have no idea how to refactor the backend. there is around 7000 lines of code I think and 300 end points, since there is a lot of options to choose from
Mohamad Shoumar 18-Aug-23 6:52am View    
Like I can easily estimate the time for designing the pages, probably 1-2 days, but the issue is that the backend has no API's, just a bunch of python files written in oop and are all connected to the main.py script which you run in the terminal. I have no idea how to refactor the backend. there is around 7000 lines of code I think and 300 end points, since there is a lot of options to choose from
Mohamad Shoumar 15-Aug-23 8:36am View    
Deleted
so from your response I was pretty sure that cloud function would be better, However The Cloud Function was just a "transplant" of the frontend logic, so I changed the logic in it and removed the promise.all since the fetching of data is dependent on each other, I I fetched them sequentially. this hugely reduced the time of loading and I'm finally satisfied with the result. Thank you so much, I appreciate your time and effort, I learned a lot about performance optimization from this.
Mohamad Shoumar 13-Aug-23 17:08pm View    
First of all thank you for your support, this is my first attempt so I appreciate your insights and guidance. I already fetched each request separately and logged the time, but the time was varying a lot each time, keep it mind that my internet speed is 400 mb/s and latency is very low. I updated the code snippet to include the requests, from a quick look, does something seems weird or like a bad practice?