Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pref: improve the search performance #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shinyruo177
Copy link

Related issues #210 #212
The input action in docs search box result in page reflow and then block js, ultimately leading to search lagging.
perf
I'm not sure what directly caused it, but uncertain height of .doc-container element maybe one significant indirect cause (I have already exclude factors such as React re-rendering, event handling, and search function consumption).

I speculate .doc-main style flex: 1 1 auto causing this uncertain behavior. Changing it to flex:1 1 100% | flex:1 1 100vh | flex:1 1 0 indeed effective for me. Additionally, Set the .doc-container element height to a fixed value also works.

The performance after modification:
image

ps: I always browsing lodash.com website in desktop as a PWA application, so I used to think the issue was due to PWA performance.馃槀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants