Pages that walk every bookmark thrash the state cache (metalgear: 7.7 s per change page) issue #116
closed: completed andymccall opened this · 0 comments
andymccall
metalgear has 128 bookmarks; the state cache holds 64. A change page's 'in bookmarks', the Bookmarks tab, the Conflicts tab, compare's default and GET /bookmarks each loaded every bookmark's full state, cycling the LRU so every lookup missed: /bookmarks and /changes/{hash} take 7.3-7.7 s every time, and each such page evicts what every other page of every repository had cached (hub at 17 GB RSS and 30-40% CPU idle). Fix: a small per-heads summary (change set, latest time, conflicted) cached separately and computed without filling the state cache; only conflicted states are loaded whole for the Conflicts tab.
metalgear has 128 bookmarks; the state cache holds 64. A change page's 'in bookmarks', the Bookmarks tab, the Conflicts tab, compare's default and GET /bookmarks each loaded every bookmark's full state, cycling the LRU so every lookup missed: /bookmarks and /changes/{hash} take 7.3-7.7 s every time, and each such page evicts what every other page of every repository had cached (hub at 17 GB RSS and 30-40% CPU idle). Fix: a small per-heads summary (change set, latest time, conflicted) cached separately and computed without filling the state cache; only conflicted states are loaded whole for the Conflicts tab.