https://bugzilla.wikimedia.org/show_bug.cgi?id=54582

       Web browser: ---
            Bug ID: 54582
           Summary: VisualEditor:
                    ce.GeneratedContentNode.generateContents() should be
                    static, so we can cache based on config objects alone
           Product: VisualEditor
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Technical Debt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to