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

Typing becomes more laggy the more blocks you have in a post #7680

Closed
notnownikki opened this issue Jul 3, 2018 · 5 comments
Closed

Typing becomes more laggy the more blocks you have in a post #7680

notnownikki opened this issue Jul 3, 2018 · 5 comments
Labels
[Type] Bug An existing feature does not function as intended [Type] Performance Related to performance efforts

Comments

@notnownikki
Copy link
Member

Describe the bug

Typing can become more laggy, and possibly totally unresponsive, the more blocks you have in a post.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new post with a single paragraph block.
  2. Hold down a key. The key should repeat in the paragraph block and the browser should stay responsive.
  3. Create an extra 30 paragraph blocks.
  4. Hold down a key in one of the paragraph blocks. The editor will lag, and it's possible for the browser to freeze.
  5. Take your finger off the key, and notice how long it takes for the editor to update.

Expected behavior

Typing in a paragraph block should be responsive no matter how many blocks you have in a post.

Screenshots

lag

Desktop (please complete the following information):

  • Browser: Chrome, Firefox, Safari
  • Version: all latest versions

Smartphone (please complete the following information):

  • Device: Hauwei mate 10 pro - noticeable lag even with just one block
@notnownikki
Copy link
Member Author

I've tested with a single paragraph block and 50 embed blocks all in the initial state, and I see the same behaviour, so it's not linked to the paragraph block, although paragraph blocks do render more slowly than the embed block in its initial state so you need fewer paragraph blocks to reproduce the problem.

@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended [Type] Performance Related to performance efforts labels Jul 3, 2018
@notnownikki
Copy link
Member Author

Problem isn't in v3.0.1, but is in v3.1.0

I'll git bisect to see if there's a single thing that introduced it.

@notnownikki
Copy link
Member Author

The CPU usage jumped up after this commit: 2c2189c

Before that commit, the steps in this issue do not reproduce the problem, and performance on my mobile devices is fine. With that commit, my browser freezes and there's noticeable lag typing on mobile.

cc: @aduth

@aduth
Copy link
Member

aduth commented Jul 3, 2018

Before that commit, the steps in this issue do not reproduce the problem

By "before", do you mean the immediate parent commit 07cb2ce ?

@notnownikki
Copy link
Member Author

@aduth yes, the immediate previous commit is fine, and performs fine on my mobile devices too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Performance Related to performance efforts
Projects
None yet
Development

No branches or pull requests

3 participants