Skip to content

Medium: KaTeX math validation runs synchronously on main thread, freezing editor in large documents #17

@harsharajkumar

Description

@harsharajkumar

In mathValidator.ts:validateMathInBuffer, katex.renderToString is called synchronously for every math snippet found in the file on every keystroke / model change. In documents with many <m>, <me>, <mrow> etc. elements, this can block the browser's main thread long enough to visibly freeze the Monaco editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmediumShould fix soon

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions