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

Cache all needed projects for navbar layout #1156

Closed
wants to merge 2 commits into from

Conversation

cproensa
Copy link
Contributor

Reduce DB query count by caching all needed projects for the navbar layout.

Fixes: #23237

After:
seleccion_231

Before:
seleccion_230

Reduce DB query count by caching all needed projects for the navbar layout.

Fixes: #23237
@cproensa
Copy link
Contributor Author

Added a second commit, where view_all_bug_page may read the project rows as part of the filter query, before the layout for navbar is done.

The projects will be used to check access level, that will require
reading the project rows from database. Making sure the projects rows
are cached avoids having individual queries later for each project.
@@ -1492,6 +1492,7 @@ function filter_get_bug_rows_query_clauses( array $p_filter, $p_project_id = nul
$t_private_and_public_project_ids = array();
$t_limited_projects = array();

project_cache_array_rows( $t_project_ids );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add the comments about why this is called, similar to the comment in the commit message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@cproensa
Copy link
Contributor Author

@atrol seems like this PR has been merged, but not closed.

@atrol atrol closed this Aug 18, 2017
@cproensa cproensa deleted the 0023237_cache_projects branch March 31, 2019 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants