-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load the commit cache in the background
This commit cache is used for the activity page and for the activity graph top-right on project pages. Apparently loading it can be expensive and take quite a while. The cache is completely optional; if it isn't there, some pages may take somewhat longer to display, but that appears less critical than spending all that time in Gerrit startup. (The cache initialization happens when the plugin is started, and Gerrit becomes fully operational only once all its plugins are ready.) Three things: * Use isEmpty() instead of size() == 0; it may be faster. (For instance on ConcurrentHashMap.) * Make the commit cache fully thread-safe. It was using a ConcurrentHashMap, but then performed several operations on it that should have been atomic, and moreover caches lists that were then manipulated directly. * Finally, run the cache initialization in a background daemon thread.
- Loading branch information
Showing
5 changed files
with
104 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters