Skip to content

Speed up retrieval of lemma suggestions #72

@mbollmann

Description

@mbollmann

Originally reported by: Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann)


Users report that retrieving lemma suggestions can sometimes take up to 7 seconds, which is huge.

The testing script introduced in commit 1e1f888 suggests that the part which retrieves lemma suggestions from other texts within the project (with the same "ascii" token) is a major bottleneck, taking almost a full second for one lookup on the production database.

If there is no evidence for other factors, refactoring this lookup should be considered.

A possible solution could be to introduce another database table which maps (project_id, mod_ascii) pairs to tag_ids of lemma annotations. This table would have to be updated whenever lemma annotations are saved, and could then be used for efficient lookup during retrieval.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions