Last modified: 2014-02-20 11:19:53 UTC
When adding a statement to an item, there is a substantial delay in between when a property is selected and when the text field is available for filling in. This makes it difficult to quickly add many statements. Presumably, the delay is caused by the system needing to retrieve the data type of the property so that it can figure out how the field is supposed to work. Perhaps it would speed things up if the autocomplete system for properties was retrieving the datatype at the same time as the label and description.
When choosing a property there is a single, pretty simple "wbgetentities" API call triggered. At the moment I don't see a reason why this should cause a "substantial" delay other than what an API call usually causes. The previous autocomplete call ("wbsearchentities") doesn't include the required information. Example response: {"id":"P46","url":"http://localhost/repowiki/index.php/Property:P46","label":"Parent"}. I don't think it's a good idea to change this. A possible solution would be to use the fetchedEntities local store to avoid these API calls if the property is already in the store. Currently the API is always requested and the store is never used (but the API calls result is put in the store). Not sure if this is a good idea. When will an outdated property in the store be invalidated?
Another option might be to just display a simple text field immediately, and only add the various additional datatype-dependent stuff after the datatype retrieval is finished.
(In reply to Yair Rand from comment #2) > display a simple text field immediately Good idea, I will keep that in mind. Another idea is to put the data needed into data values in the DOM and use that instead of querying the API. But this depends on how we fix bug 54098.