aude added a comment.

a more performant option might be something like the visitor pattern when we 
traverse all the snaks.

we already traverse all snaks in ReferencedEntitiesFinder and that is somewhat 
slow.  We should traverse only once when generating parser output.

We can register multiple 'visitors' and for each snak, they can optionally do 
something and register some data, and have a method to get the data after 
traversing.

via a hook or registry, GeoData could register a visitor for getting 
coordinates, there could be one for PageImages, and ones for other stuff we 
currently do.


TASK DETAIL
  https://phabricator.wikimedia.org/T114113

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: aude
Cc: aude, Aklapper, Wikidata-bugs



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to