-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
backendchanges to the django backendchanges to the django backendcode qualitycode & performance improvements that do not affect user functionalitycode & performance improvements that do not affect user functionality
Description
The corpus API includes a property has_named_entities
that checks whether named entity annotations are available. The value is taken from a property that checks this with a query.
This query is made every time a user loads the home page, for every corpus they can see (even ones that do not support named entity data). This is a lot of queries, which slows down the page. Also, this property does not need to be checked all the time.
Solution:
- Move the query to the
save_corpus
module so it is run when a Python corpus is imported and/or during server startup. - Only check this if the corpus definition includes named entity fields.
Metadata
Metadata
Assignees
Labels
backendchanges to the django backendchanges to the django backendcode qualitycode & performance improvements that do not affect user functionalitycode & performance improvements that do not affect user functionality