Page MenuHomePhabricator

Frontend JS should not re-render qualifiers and references upon load.
Closed, ResolvedPublic


Currently, qualifiers and references are re-rendered on the frontend. The JS UI should just re-use the HTML that comes from the backend.

Event Timeline

daniel created this task.Feb 3 2015, 2:22 PM
daniel raised the priority of this task from to High.
daniel updated the task description. (Show Details)

While suppressing JS redrawing on load is not that hard (in relative terms--still, it is the snakview), additional implications show up: When stopping edit mode ("save"/"cancel"), the by far easiest action to update/reset qualifier and reference Snaks is to clear the list widget managing them and re-init that listview. That mechanism (which is not going to change) will, of course, drop any previously rendered DOM (removing fall-back information from any Property used in the qualifier/reference Snaks).
Question @Lydia_Pintscher: Which one is to tackle first: T88275 or T88425?

If the second gives uns performance improvement then that one. Otherwise the first one please.
Along with the refactoring, the Property DOM is nor re-rendered on page load anymore. This definitely improves performance. SnakTypeSelector and Variation are sill re-rendered though. That may be avoided as well (as the values are rendered properly formatted in the back-end) which would result in more performance improvement. Should be done in other change sets though.

Update: The change set got updated to also not re-render the Variation on initialization. (SnakTypeSelector actually was not re-rendered when initializing the snakview on previously generated HTML.) Should be a considerable performance boost now.

gerritbot added a subscriber: gerritbot.

Change 189018 had a related patch set uploaded (by Adrian Lang):
snakview: Refactored drawing mechanism


Change 189018 merged by jenkins-bot:
snakview: Refactored drawing mechanism

adrianheine closed this task as Resolved.Mar 17 2015, 7:43 AM
adrianheine moved this task from Review to Done on the § Wikidata-Sprint-2015-03-11 board.