Bug 528107

Summary: investigate performance of retargettable commands
Product: [ECD] Orion (Archived) Reporter: Michael Rennie <Michael_Rennie>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 Keywords: performance, triaged
Version: 16.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2017-12-04 11:03:43 EST
While working on bugs 528093 and 525573 I noticed that the isVisible() call is made a lot, and depending on what the commands do, this makes sense. But in the case of 'format', 'references', 'definition' and any others that simply work on the underlying content type, the commands do too much work.

We should investigate ways to minimize the amount of work done across commands like this to avoid impacting the UI.

An example pain point:

the isVisible of the 'format' command. It walks the content types array over and over again as the isVisible function is called - but it could likely just do that work one time when the input changes and cache the result until the next input change (when the content type might actually change).