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

StatusSubtypeAssignedTask
ResolvedLydia_Pintscher
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolved adrianheine
ResolvedNone
ResolvedNone
ResolvedNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
DeclinedNone
Resolvedthiemowmde
DeclinedLydia_Pintscher
DeclinedNone
InvalidNone
Resolvedthiemowmde
InvalidNone
DeclinedNone
OpenNone
OpenNone
Resolved adrianheine
Resolved adrianheine
Resolved adrianheine
ResolvedNone
Resolved adrianheine
InvalidNone
Declined Jonas
ResolvedNone
Resolved adrianheine
Resolved adrianheine
Invalidthiemowmde
Resolved adrianheine
Resolvedthiemowmde
OpenNone
OpenNone
ResolvedLadsgroup
ResolvedLea_Lacroix_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
Resolvedmatej_suchanek
ResolvedLea_Lacroix_WMDE
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:55 AM
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 claimed this task.

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