Skip to content

Optimize PygmentsLexer creation #1924

@nitanmarcel

Description

@nitanmarcel

I have an editor and I'm using PygmentsLexer to lex my file but this ends up with slow start speeds for my application. I'm using asyncio and each time I start my application with the layout attached the app takes 1 second to start, with 0.30 seconds taken by the PygmentsLexer.

What can I do to optimize this? Maybe there's a way to create the lexer after my app starts?

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