Skip to content

Only call exec once per group - #303

Merged
svengreb merged 2 commits into
nordtheme:developfrom
jvoisin:one_exec
Apr 24, 2022
Merged

Only call exec once per group#303
svengreb merged 2 commits into
nordtheme:developfrom
jvoisin:one_exec

Conversation

@jvoisin

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

Julien Voisinand 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.

@svengrebsvengreb left a comment

Copy link
Copy Markdown
Member

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:developApr 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%29GH-303
@jvoisin
jvoisin deleted the one_exec branch November 28, 2022 10:59
Sign up for freeto 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

@jvoisin@arcticicestudio@svengreb