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

Only call exec once per group #303

Merged
merged 2 commits into from Apr 24, 2022
Merged

Only call exec once per group #303

merged 2 commits into from Apr 24, 2022

Conversation

jvoisin
Copy link
Contributor

@jvoisin jvoisin commented Apr 12, 2022

Calls to exec are quite expensive, so using
string concatenation and a single exec at the end
instead of a couple of exec yields a nice
startup performance boost.

@jvoisin
Copy link
Contributor Author

jvoisin commented Apr 12, 2022

(I tested this commit locally, unlike the previous one)

Calls to `exec` are quite expensive, so using
string concatenation and a single exec at the end
instead of a couple of exec yields a nice
startup performance boost.
Copy link
Member

@svengreb svengreb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jvoisin 👋, thanks for your contribution 👍
Thanks again, definitely a better implementation.

@svengreb svengreb merged commit 77fe4b3 into nordtheme:develop Apr 24, 2022
arcticicestudio pushed a commit that referenced this pull request May 14, 2022
Before the custom `s:hi` function called Vim's `execute` function [1]
for each defined attribute which is quite expensive in terms of
performance. To improve this the attributes are now concatenate as
string and passed to `exec` at the end of the function instead.


Co-authored-by: Julien Voisin <jvoisin@google.com>
Co-authored-by: Sven Greb <development@svengreb.de>
Co-authored-by: Arctic Ice Sudio <development@arcticicestudio.com>

[1]: https://vimhelp.org/builtin.txt.html#builtin.txt#execute%28%29

GH-303
@jvoisin jvoisin deleted the one_exec branch November 28, 2022 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants