Skip to content

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

Closed

Description

@notnownikki

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

Activity

  1. notnownikki commented on Jul 3, 2018

    @notnownikki
    MemberAuthor

    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.

  2. added
    [Type] Bug
    [Type] Performance
    on Jul 3, 2018
  3. notnownikki commented on Jul 3, 2018

    @notnownikki
    MemberAuthor

    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.

  4. notnownikki commented on Jul 3, 2018

    @notnownikki
    MemberAuthor

    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

  5. aduth commented on Jul 3, 2018

    @aduth
    Member

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

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

  6. notnownikki commented on Jul 3, 2018

    @notnownikki
    MemberAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Bug[Type] Performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions