| Summary: | eliminate the multiple rendering calls when updating the toolbar for command contributions | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Client | Assignee: | Susan McCourt <susan> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | simon_kaegi |
| Version: | 0.5 | ||
| Target Milestone: | 0.5 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
I would like to investigate this for M1 but it might slip to M2. Somewhat related. In bug 376542, we were failing in the command rendering because we didn't have editor metadata yet. So for editor commands, we should ensure we don't bother buiding command contributions from the registry until we know we have metadata to validate against. I did the navigator part of this, there was no reason at all to update the nav tools until the service extensions were processed. It's all synchronous now. Updated the editor. We were previously rendering when: 1 - we were first created 2 - once for each extension command found 3 - again when we got the metadata Eliminated (1) since it makes no sense to check commands before we have metadata to validate against. Collapsed (2) to the end of the extension processing, now that we aren't running a service implementation anymore. Further, we don't bother if we still don't have metadata. (3) is the one we need. So, with three editor commands installed, we went from 5 renderings of the toolbar commands to 1. Note that those first 4 bail out very quickly, so it wasn't a huge time cost, but it was really painful to debug toolbar rendering when you had to step through so much unnecessary calling. |