Page MenuHomePhabricator

Eliminate or reduce delay between selection of property and displaying of input fields when adding statements
Closed, ResolvedPublic

Description

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.


Version: master
Severity: normal

Details

Reference
bz61131

Related Objects

StatusAssignedTask
ResolvedLydia_Pintscher
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedadrianheine
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
DeclinedNone
Resolvedthiemowmde
DeclinedLydia_Pintscher
DeclinedNone
OpenNone
Resolvedthiemowmde
InvalidNone
DeclinedNone
OpenNone
Openthiemowmde
Resolvedadrianheine
Resolvedadrianheine
Resolvedadrianheine
ResolvedNone
Resolvedadrianheine
InvalidNone
Declined Jonas
ResolvedNone
Resolvedadrianheine
Resolvedadrianheine
Invalidthiemowmde
Resolvedadrianheine
Resolvedthiemowmde
OpenNone
OpenNone
StalledNone
ResolvedLea_Lacroix_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
Resolvedmatej_suchanek
ResolvedLea_Lacroix_WMDE

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz61131.
bzimport added a subscriber: Unknown Object (MLST).

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.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher closed this task as Resolved.Apr 23 2017, 3:04 PM
Lydia_Pintscher claimed this task.

I think this is good for now. Further improvements will need to be made with new frameworks.