Do not load the entire property when adding a statement
Open, Needs TriagePublic

Description

When trying to look up a statement wbsgetsuggestions is called, e.g. https://www.wikidata.org/w/api.php?action=wbsgetsuggestions&search=i&context=item&format=json&language=en&continue=0&entity=Q4115189&uselang=en

The result included two types of results:

  1. results from PropertySuggester, with label, description (currently without fallback, see T112112), but not datatype.
  2. results from Entity Suggester, with label, description (with fallback), but not datatype.

Currently whatever user selects the property, the property is downloaded via wbgetentities. (This happens even if we add another claim for a property that already existed a claim, as long as the property has not been loaded yet.) This is not optimal, as a property may be very large. Therefore:

  1. For results from Entity Suggester, we can just use label, description and datatype from the result
  2. For results from PropertySuggester, we can either (a) make a "cheap" request to only query the datatype without serialize the whole property, or (b) add datatype to PropertySuggester result (more preferred, this saves one web request)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2018, 7:26 AM