Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: lazy load yazi.nvim modules by default #253

Merged
merged 3 commits into from
Jul 24, 2024
Merged

Conversation

mikavilpas
Copy link
Owner

Previously yazi.nvim would load most of its modules up front when required. This is not ideal as typically this delays Neovim's startup time. Although the delay is measured in milliseconds, it might add up if tens of other plugins need to be loaded too.

This commit changes the behavior so that yazi.nvim only loads the modules when they are actually needed. The number of loaded modules has changed from 17 to 7, but I did not measure the startup time difference.

Previously yazi.nvim would load most of its modules up front when
required. This is not ideal as typically this delays Neovim's startup
time. Although the delay is measured in milliseconds, it might add up if
tens of other plugins need to be loaded too.

This commit changes the behavior so that yazi.nvim only loads the
modules when they are actually needed. The number of loaded modules has
changed from 17 to 7, but I did not measure the startup time difference.
@mikavilpas mikavilpas enabled auto-merge (squash) July 24, 2024 18:15
@mikavilpas mikavilpas merged commit f832c3c into main Jul 24, 2024
14 checks passed
@mikavilpas mikavilpas deleted the optimize-lazy-loading branch July 24, 2024 18:16
@mikavilpas
Copy link
Owner Author

My guess is that the startup time in my own case went down from 4ms to 2ms in my own configuration. Your mileage may vary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant