Page MenuHomePhabricator

Unnecessary render calls while viewing an object and toggling expand
Closed, ResolvedPublicBUG REPORT

Description

Description

When viewing a composition that includes rendered values, the collapsed version is generated by calling the renderer function.
Even in view mode, where values are not changed, when expanding and collapsing the function calls are run again, generating unnecessary calls to the function_call API
This should be avoided

Steps to reproduce:

  1. Go to https://www.wikifunctions.org/wiki/Z23245
  2. See how the rendered values are queued and generated one after the other
  3. Expand the first level: observe how the same values are re-rendered
  4. Collapse again: observe how the same values are re-rendered

Observed behavior:

view-composition-triggers-unnecessary-renders-2.gif (743×1 px, 3 MB)

Expected behavior (Acceptance criteria):

  • Unnecessary calls to wikilambda_function_call should be avoided if possible

Devices and Design (URLs or screenshots, if applicable):

  • Desktop: ...
  • Small screens/mobile: ...

Completion checklist

Event Timeline

I sometimes use this "feature" to re-attempt renders which failed the first time. Perhaps you can try to keep track of this and selectively re-render?

Change #1208367 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] RunRenderer: Unnecessary render calls while viewing an object and toggling expand

https://gerrit.wikimedia.org/r/1208367

DSmit-WMF changed the task status from Open to In Progress.Tue, Nov 25, 8:36 AM
DSmit-WMF claimed this task.

Change #1208367 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] RunRenderer: Unnecessary render calls while viewing an object and toggling expand

https://gerrit.wikimedia.org/r/1208367