Actions
Patch #39835
closedOptimize repository menu visibility check
Description
This patch introduces an optimization in the way Redmine determines the visibility of the "Repository" menu item.
While the current code loads the entire collection of repositories associated with the project, the new code only checks if there are any records in the repositories table associated with the project's ID. This can be faster if the project has a lot of repositories.
SQL of the current code:
Repository Load (0.0ms) SELECT "repositories".* FROM "repositories" WHERE "repositories"."project_id" = ? [["project_id", 1]]
SQL of the new code:
Repository Exists? (0.0ms) SELECT 1 AS one FROM "repositories" WHERE "repositories"."project_id" = ? LIMIT ? [["project_id", 1], ["LIMIT", 1]]
Files
Actions