Repository navigation
perf(startup): defer implementation modules - #435
Merged
Merged
Conversation
Keep configuration validation and entry-point registration eager. Load commands, runtime, and integrations only when their entry points run. Screen ordinary files for conflict markers before loading conflict support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #125 and the startup-time concern raised there.
Problem
The plugin bootstrap loads 29 of 38 Lua modules before a user invokes a feature.
BufReadPostalso initializes runtime support for ordinary files.Before/After Profiling
mainbefore and after the change:mainmedianThe first relevant
gitfile type moves from 8.365 ms to 9.875 ms. This 1.510 ms cost occurs when the feature is first needed.For a 100,000-line buffer with a marker at the end, native marker search takes 2.985 ms. Copying and scanning the buffer in Lua takes 6.698 ms.