WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.47k stars 4.18k forks source link

Typing block editor has significant lag, particularly on Chrome MacOS #22822

Open jamescl opened 4 years ago

jamescl commented 4 years ago

Describe the bug Typing in the block editor (most noticeably in the paragraph block) editor has a noticeable delay. The lag increases the larger the post becomes.

On one machine, we are finding that typing a sentence of 10 words can take 30 seconds to render on screen.

Using Chrome's performance tool I've observed that keypress/keyup/keydown/input & their child events are taking a long time to run.

As an example, and comparing different machines (specs at bottom), a keypress event is taking

Using the editor on the macbook Pro is truly painful - every 10 words taking 3-5 minutes to compose and completely breaking up the editing experice - while the desktop rendering is only a little bit jerky.

Neither is acceptable and while the MacBook is a bit old, I don't think it's fair to expect everyone to have gaming PCs to write some blog spots.

I appreciate this issue is similar to #6466 and #7680 - but both of those were closed in #7699, and the performance issues persist.

To reproduce Steps to reproduce the behavior:

  1. Add new post
  2. Start Typing / adding content

Expected behavior To have a smooth typing experience.

Screenshots If applicable, add screenshots to help explain your problem.

Chrome performance Macbook: image

Comparing classic block and paragraph block typing "The quick brown fox jumps over the lazy dog" image

Editor version (please complete the following information):

Desktop (please complete the following information):

Machine 1: 2016 MacBook Pro / 2.9 GHz Intel i5 / 8GB RAM / MacOS Catalina 10.15.4 Machine 2: Microsoft Surface 2.5 GHz Intel i5 / 8GB Ram / Windows 10 Machine 3: PC Desktop / 3.3 GhZ Intel i0 / 32GB Ram / Windows 10