Skip to content

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)

Julien Voisin and others added 2 commits April 24, 2022 09:54
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 <[email protected]>
Co-authored-by: Sven Greb <[email protected]>
Co-authored-by: Arctic Ice Sudio <[email protected]>

[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.

3 participants