add the ability to pause/buffer IConfigurationRegistry event and adopt in extension service by jrieken · Pull Request #138259 · microsoft/vscode (original) (raw)
Profiling has shown that reading contribution points updates configurations a lot 1. The event of the configuration registry fire in my dev setup around 50 times. There is only 4 listeners to these events but assuming a listener takes 1ms it still makes 200ms (50*4*1
) to fire them.
This PR adds a way to pause/resume eventing of the configuration registry and adopts that in the extension service when reading contribution points.
I measured the gains against todays insiders and things are looking pretty good. I have tested with only builtin extensions and with the 30 extensions that I have installed (using my data as real world representative, it is also pretty close to the real world average duration for this). The measurements are the times between the willHandleExtensionPoints
and didHandleExtensionPoints
perf-marks (F1 > Startup Performance)
Insiders (0cc0904c56) | PR 7907361 | sandy081/perf c4bd3f8 | |
---|---|---|---|
builtin extensions | 185.6 | 71 (-114.6ms) | 94.5 (-90.2ms) |
builtin extensions and 30 more | 448.8 | 148.2 (-300.6ms) | 163.8 (-285ms) |
--
1 Looks like most events are triggered from custom editors and notebooks. Something to drill into further