Opening Settings › Plugins took most of a second
- Cause
- For each installed plugin, the page rebuilt the plugin and module maps and walked the dependencies of every essential plugin, on the UI thread. The cost grows with the square of the number of installed plugins, and the source code already had a FIXME about it.
- Intervention
- Compute the set of plugins that essential plugins require once per plugin set, then look each plugin up in it. The cache is dropped when the plugin set is replaced.
- Result
- With 158 plugins loaded, the page took 689–931 ms to open. One walk plus a lookup per plugin takes 8–22 ms and gives the same answer for all 158.
Ticket and measurement testPull request #3701