Skip to content

PyVim Slows Down on Large Files #131

Open
@SqrtRyan

Description

@SqrtRyan

I'm considering trying to build a new text editor with Prompt Toolkit, and I used PyVim to see how practical this would be. Unfortunately, although PyVim is wonderful, it chokes on files that have 10,000 lines of code upward (but only when using syntax highlighting). Native vim doesn't slow down on the same file; or files that are 100,000 lines upward (I'm talking about the time it takes for me to insert or delete a character).
I think it has to do with the way prompt_toolkit handles syntax higlighting via pygments; and that it's not cacheing it as well as it could (because it slows down to unbearable speeds when you give it enough code at a time; vs vim which seems to maintain a constant speed regardless of how many lines of code are in the file you're editing)
Because of this I've decided to wait out on building a text editor with prompt_toolkit until I'm assured that it's time complexity for syntax highlighting is not a function of file size; or at least, is so fast that I don't feel like it's lagging badly.
Is there any way to get around this? (I want to edit large files in a prompt_toolkit buffer with syntax highlighting)

Thank you,
Ryan

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