Skip to content

Poor typing performance with spell checking enabled #26

@ingoncalves

Description

@ingoncalves

From ether/etherpad-lite#5302

Users reported poor performance while typing. This problem was observed in both small and large documents, especially when there are multiple users editing the same document (also observed with a single user).

In fact, the performance is severely degraded, without visual response (0 FPS) while typing, with the text being rendered after dozen seconds after stopping typing. Initially, it was observed only in Google Chrome version 96 or later. Tests were performed on Mackbook Pro (16-inch 2019, 16GB RAM, SSD, 2.6 GHz 6-Core Intel Core i7) and also on Linux and Windows. Besides that, curiously the problem was even worse after switching tabs in the browser.

After a deep investigation in our code (core + plugins) in order to find the root cause, we figured out the problem stops when the browser's spellcheck is disabled. By enabling the spellcheck in Firefox, it also showed the same performance issue.

We also noticed that, in our stack, the ep_spellcheck plugin is responsible for enabling the spellcheck in the Etherpad’s #innerdoc iframe. By disabling this plugin, the performance gets back to normal.

To Reproduce

The minimum setup to reproduce this problem is to use Etherpad with ep_spellcheck plugin only.

Steps to reproduce the behavior:

  1. Creates a pad
  2. Access the created pad with two users and start typing (also possible with a single user)
  3. If necessary, switch to another browser tab and go back to the pad
  4. See very slow typing speed

Expected behavior
Typing speed should be fluid.

Server (please complete the following information):

  • Etherpad version: 1.8.15
  • OS: Ubuntu 20.04
  • Node.js version: v12.22.6
  • npm version: 6.14.15
  • Is the server free of plugins: No, it has only ep_spellcheck.

Desktop (please complete the following information):

  • OS: [macOS Monterey 12.0.1, Ubuntu 20.04]
  • Browser: [Chrome 96.0.4664.55, Firefox 94.0.2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions