With ~1s latencies, we will try to find something in the thread dumps but it will probably be difficult.
Initially I run it with the command `asprof -d 30 -f %t-process-%p-flamegraph.html $(pgrep -f GerritCodeReview)` but to limit the data, I started and stopped manually.
Based on the graph we got, it seems to be taking most of the time on account/AccountCacheImpl.get.
At some point of the account cache stack, I can see a `NoSuchFileException` but I cant find any filesystem issues under the All-Users.git directory.
The other operation that also takes more time is `account/GroupControl.isVisible`, which has 2 distinct stacks.
One is touching `project/ProjectState` and the other touching `metrics/TimerContext`.
I already tested flushing the accounts, groups(all of the caches related to) and as expected, the first run will always take longer(populating the cache) and on next runs I always have the ~1s latency.
Also flushed all the caches(it took 15 minutes to complete the flush, yay h2 :p) but same scenario happens. First run takes longer and populates the cache and next runs keeps at ~1s.
In attach are the snippets of the flamegraph related to the classes I mention before.
Any tips from anyone are welcome :)
Thanks,
Nuno