15,790,052 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Python questions
View PHP questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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?
Mohamad Shoumar
13-Aug-23 14:09pm
View
from what you said I understood that I should handle the logic on the server side and then call it from the client side, so I created a cloud function and then called it but it's still taking the same amount of time. However, I'm seeing that fetching the user's info and balance and stuff like that is rarely taking >1s. The main issue is with the announcement which is taking well above 1s
Mohamad Shoumar
13-Aug-23 8:23am
View
less than 100, the clients are 15 in total. Btw I just managed to reduce the fetching time by changing the order by to ascending instead of descending to align with fire store's default ascending order
const latestAnnouncementRef = query(announcementsRef, orderBy("date", "asc"), limit(1));
Show More