Last modified: 2014-03-11 02:04:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56582, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54582 - VisualEditor: ce.GeneratedContentNode.generateContents() should be static, so we can cache based on config objects alone
VisualEditor: ce.GeneratedContentNode.generateContents() should be static, so...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-25 01:13 UTC by Roan Kattouw
Modified: 2014-03-11 02:04 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2013-09-25 01:13:15 UTC
Right now, GCNode caching uses both the model hash and the hash of the config object. However, when properties in the config override properties in the model, the preview of a change and the new model node after the actual change will be the same but have different hashes (because the model is different, and because in the second case the config object is empty/undefined).

We should make generatedContents() static, so it can't inspect the model or any object state, and have a function that provides the default config that is then used to extend the provided config. That way we don't end up duplicating things in cache and rendering things twice.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links