Skip to content
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

Check possibility to rewrite the homepage view to have lazy load with parallel database queries #40547

Open
1 of 2 tasks
pankajkoti opened this issue Jul 2, 2024 · 3 comments
Labels
area:performance area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:feature Feature Requests

Comments

@pankajkoti
Copy link
Member

Description

Performance Analysis of Home Page Query Execution

I have analyzed the queries executed on the home page and attaching herewith the top 5 slow queries observed with enabling pg_stat_statements in the postgres container and having about 40k DAG locally with Breeze. My observations indicate that we have the necessary indexes for those queries, and adding any additional indexes does not improve performance.

hp_slow_query_1.txt
hp_slow_query_2.txt
hp_slow_query_3.txt
hp_slow_query_4.txt
hp_slow_query_5.txt

Sequential Query Execution on Home Page

Problem: On the /home view, queries are executed one after the other serially. The home page is not returned and rendered until all queries finish processing. The five queries listed take about 85-90% of the total time. Even with indexes, they still take considerable time due to the large number of records.

Use case/motivation

The current implementation of the home page results in significant delays in rendering due to the sequential execution of multiple queries. This affects the user experience as users have to wait for all queries to finish processing before the page is displayed. By implementing parallel query execution and lazy loading, we can achieve the following:

  1. Faster Page Load Times: The home page can begin rendering as soon as the first query results are available, rather than waiting for all queries to complete.
  2. Improved User Experience: Users will experience a more responsive and dynamic interface, as parts of the page will load incrementally.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@pankajkoti pankajkoti added kind:feature Feature Requests needs-triage label for new issues that we didn't triage yet labels Jul 2, 2024
@dosubot dosubot bot added area:performance area:webserver Webserver related Issues labels Jul 2, 2024
@RNHTTR RNHTTR removed the needs-triage label for new issues that we didn't triage yet label Jul 2, 2024
@pankajkoti pankajkoti added the area:UI Related to UI/UX. For Frontend Developers. label Jul 2, 2024
@pankajkoti
Copy link
Member Author

cc: @bbovenzi for your attention and thoughts on this one.

@tirkarthi
Copy link
Contributor

Related

#38776
#36504

@bbovenzi
Copy link
Contributor

We already need to rewrite the whole page soon. We can redo the queries, caching, and loading order then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:performance area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

4 participants