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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fit-textareas causing major performance issue when typing in PR description textarea with Chrome #4275

Closed
with-heart opened this issue Apr 25, 2021 · 6 comments
Labels

Comments

@with-heart
Copy link

with-heart commented Apr 25, 2021

With the fit-textarea feature enabled in refined-github@21.4.23, I'm experiencing a severe performance degradation when typing in a PR description textarea. Each letter appears to be taking ~500ms to be handled, making the feature unusable as it takes multiple seconds for a few words to appear.

Performance profile shows this line taking 1.5s per call:
image

Disabling the fit-textarea feature removes the delay.

I've uploaded the Chrome performance profile json file here: https://gist.githubusercontent.com/with-heart/f0d3b0914d2c25e6f635d82f91404e10/raw/af6e016d11ddf07e73a4459a6f40b1cc4ad58885/refined-github-performance-profile.json

This issue appears to be related to #4266.

@with-heart with-heart added the bug label Apr 25, 2021
@fregante
Copy link
Member

Is this something that changed in the last release? Can you post a link to an affected PR? I see this
Screen Shot

@SimenB
Copy link

SimenB commented Apr 26, 2021

I'm seeing the same thing (or rather, the slowdown. I haven't profiled it). E.g. in jestjs/jest#11033, but it happens in every PR for me (although the lag/delay gets worse the larger the diff is). This is using 21.4.23, which I think is the latest?

Disabling the fit-textarea feature removes the delay.

Same for me 🙂


Testing in a larger PR at work - just hitting record in performance tab and writing "asdasdasdasdasdasd" takes 17s seconds to appear

image

Every keypress is 750-850ms

image

Horrible colors, but it say 7868.3

@fregante
Copy link
Member

I'll revert this change in the next release, let's see how it will be.

The strange part is that .scrollHeight was actually in the previous version as well. This version was supposed to improve performance since it no longer resets the whole textarea every time: fregante/fit-textarea#15

I reopened fregante/fit-textarea#14

@fregante fregante mentioned this issue Apr 26, 2021
@kylemh
Copy link

kylemh commented Apr 26, 2021

I'm also seeing it a PR review comment textarea. It seems very heavy onFocus, onBlur, and on key stroke.

Screen Shot 2021-04-26 at 8 50 24 AM

@yakov116
Copy link
Member

We are going to revert the change in the next release.

@yakov116 yakov116 changed the title fit-textarea causing major performance issue when typing in PR description textarea with Chrome fit-textareas causing major performance issue when typing in PR description textarea with Chrome Apr 26, 2021
@fregante
Copy link
Member

Feature disabled via hotfix for the time being

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

No branches or pull requests

5 participants