| Lucas_Werkmeister_WMDE added a comment. |
It’s still valid, but I think there are two fairly separate tasks here.
- We currently query the database for constraints on a property every time we check constraints on a property, which can be several times per request if there are several statements of the same property on an item, or if an API request includes several items. (This currently happens in DelegatingConstraintChecker::checkStatement and ConstraintRepository::queryConstraintsForProperty.) I imagine we could introduce some caching ConstraintLookup.
- Some constraints, like “has type” (type) or “has statement” (item), are really constraints on the item, not on the statement; if multiple statements all introduce the same constraint on the item (for example, parent, sibling, date of birth, etc. might all require type: human), it only needs to be checked once. This seems like a more fundamental change to me, and unrelated to the first task, which is purely technical.
TASK DETAIL
EMAIL PREFERENCES
To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Tamslo, Dimitri.schmidt, Andreasburmeister, Lydia_Pintscher, Aklapper, Jonas.keutel, Liuxinyu970226, QZanden, Izno, abian, Wikidata-bugs, aude, Mbch331
Cc: Lucas_Werkmeister_WMDE, Tamslo, Dimitri.schmidt, Andreasburmeister, Lydia_Pintscher, Aklapper, Jonas.keutel, Liuxinyu970226, QZanden, Izno, abian, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
