Skip to content

[MNT]: mathtext.MathTextParser is slow #20821

Open
@HDembinski

Description

@HDembinski

Summary

The mathtext.MathTextParser is a performance bottleneck.

I profiled my interactive app that uses PyQt and matplotlib to draw complex plots with very little text and yet significant time (20 %) is spend in the mathtext.MathTextParser. See
profile_graph.pdf

Proposed fix

The parser is using pyparsing internally and could potentially be speed up by switching to lark.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions