Files
gerrit/java/com/google
Youssef Elghareeb 3d54930d42 Cache the comment context
This change introduces a cache interface for the comment context
(CommentContextCache). The request execution flow is as follows:
ListChangeComments loads all comments from the change notes and passes
them to the CommentJson for formatting. If the "context" flag is set,
CommentJson uses the CommentContextCache to evaluate and retrieve the
context for all comments.

The comment context cache interface uses a persisted cache and provides
two methods: get() and getAll(). The getAll() method is the one used by
CommentJson. The cache loader also overrides the load() and loadAll()
methods. The cache loader uses CommentContextLoader.java to load the
context by opening the files at the exact commits specified for each
comment.

The loadAll() method groups all comments by project and change ID (both
specify a certain commit). All comments in the same group are loaded
simultaneouly.

Change-Id: I4bc24c0556974dac99d14fef3128f6db8da18e54
2020-10-08 16:42:17 +02:00
..
2020-10-08 16:42:17 +02:00