Skip to content

Reduce re-renders in Quick Search Box

Yuto Takano requested to merge reduce-rerender-in-search into master

Attempts to fix excessive and expensive re-rendering of Markdown in quick search results:

  • Fix results deeply re-rendering if highlighted selection changed (via arrow keys)
  • Fix results deeply re-rendering on every keystroke without waiting for text de-bounce
  • Fix network-based search results deeply re-rendering when local category search results changed

As the QuickSearchBox component unavoidably re-renders on every state change (change on every: keystroke, local results, network results, selection), the fix was to prevent deep child re-rendering through memoising the rendered results.

(I hope the fix works somewhat; React Developer Tools is awful at debugging re-renders. In any way it shouldn't be /worse/, just same or better)

Merge request reports

Loading