Skip to content

Zhudi renders slowly #43

@lindenr

Description

@lindenr

Showing definitions can take a very long time, depending on the word. I did a bit of profiling and it turns out the _format_codes function is to blame, probably because it searches the whole db for every character. I think it would be better to do one db search on startup, and keep a dictionary of (character) -> (code) in memory. What do you think?

For now I've just made _format_codes return an empty string in my local build and it runs much faster! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions