Skip to content

UI becomes unresponsive while searching docsΒ #231

@georapbox

Description

@georapbox

Description

When searching the docs, while typing in the search field, UI becomes unresponsive. The issue seems to be caused due to the fact that the whole page is repainted on every keystroke and the event handler responsible to perform the search does not seem to be debounced. As a side note, if you switch to the docs of version 2.4.2, the issue still exists but is less obvious as the length of the page is much smaller than when in version 4.17.15 (latest at the time of writing).

Enabling "Paint flashing" in Chromium developer tools might be helpful for debugging.

screenshot

Steps to reproduce

  • Navigate to the latest version of the documentation page (https://lodash.com/docs/4.17.15 in my case).
  • Try to type something in search field, eg "compact".

Expected result

UI should be responsive while user types in search field.

Actual result

Searching causes the whole page (which is long) to repaint on every keystroke resulting in UI being unresponsive.

Device details

Chromium: 87.0.4280.67 (Official Build) (x86_64)

Additional information

Issue seems to be more obvious in Chromium browsers (tested in both MacOS and Linux). Tested in Firefox 83.0 and Safari 14.0 and they don't seem to suffer that much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions