do plugins affect performance?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

do plugins affect performance?

meine
Hi,

Does anyone know if installed plugins affect the speed of Vim when they
are not used?

I don't use many plugins, but know that 'add ons' in other programs can
slow up the workings, even when not used.

TIA

//meine

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/X/G0DJgKBzmwPYna%40trackstand.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

Gevisz
вс, 3 янв. 2021 г. в 14:09, meine <[hidden email]>:
>
> Does anyone know if installed plugins affect the speed of Vim
> when they are not used?
>

It is not clear what you mean by "not used plugins".

If "not used" here means that these plugins are not loaded
into the memory while Vims starts, I cannot see any reason
why they should have any influence on its performance.

If, however, "not used" means that they are loaded into
the memory while Vim starts but eventually are not used
by the user, then of course they can affect its performance,
for example, by constantly checking if the user has not
entered a sequence of symbols that should be processed
by them.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2Bt6X7dMzQWQTgfoOsvEtRBU3sJH6E41EyMQvFo%2BiXSXW%3DPw3Q%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

Charles Campbell-2
gevisz wrote:

> вс, 3 янв. 2021 г. в 14:09, meine <[hidden email]>:
>
> Does anyone know if installed plugins affect the speed of Vim
> when they are not used?
>
>
> It is not clear what you mean by "not used plugins".
>
> If "not used" here means that these plugins are not loaded
> into the memory while Vims starts, I cannot see any reason
> why they should have any influence on its performance.
>
> If, however, "not used" means that they are loaded into
> the memory while Vim starts but eventually are not used
> by the user, then of course they can affect its performance,
> for example, by constantly checking if the user has not
> entered a sequence of symbols that should be processed
> by them.
>
I agree with gevisz: a plugin could have an impact on performance even
if not used. Just imagine that there's a busy wait loop that fires up
when the plugin is loaded -- it would just hog the machine (well, at
least a core).

Nonetheless, mostly what plugins do upon startup is:

   define functions
   define various mappings, commands

Vim, of course, does have to determine whether or not a given sequence
of symbols invokes a command, function, or mapping. There are a number
of ways to do this; some are log-m (m=qty characters in the string,
n=qty of strings), so adding in extra mappings, commands, and functions
should be negligible cost in time.

So, I would not expect unused plugins to exact a performance cost.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/03ba79aa-8335-7195-7246-24609e988f9c%40drchip.org.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

Salman Halim
I was thinking the same thing: unless a plugin
has expensive autocommands that trigger often, but do nothing (CursorHold, for example), the only time performance hit should be upon initial startup when it's loaded.

It is possible that a plugin defines mappings with ambiguity and that introduces a timeout for Vim to figure out which mapping to use, but that delay isn't caused by the hardware not being able to keep up. I occasionally get mapping collisions in new plugins that conflict with unused plugins or unused parts of plugins, which would be a good reason to only keep the plugins you actually use. 

Salman

On Thu, Jan 7, 2021, 13:30 Charles Campbell <[hidden email]> wrote:
I agree with gevisz: a plugin could have an impact on performance even
if not used. Just imagine that there's a busy wait loop that fires up
when the plugin is loaded -- it would just hog the machine (well, at
least a core).

Nonetheless, mostly what plugins do upon startup is:

   define functions
   define various mappings, commands

Vim, of course, does have to determine whether or not a given sequence
of symbols invokes a command, function, or mapping. There are a number
of ways to do this; some are log-m (m=qty characters in the string,
n=qty of strings), so adding in extra mappings, commands, and functions
should be negligible cost in time.

So, I would not expect unused plugins to exact a performance cost.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEdUs1yWc9P06ZfTCA5DoLRZRN_zO4t_vCMhdkL32Rb2PA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

DavidLowryDuda
Aside from startup time (especially if plugins don't use autoload), unused plugins should barely affect speed. But I'll note that it's pretty straightforward to profile vim to see what is taking time and clock cycles, in case you want to actually examine one or more suspicious plugins and determine what is causing slowness.

- DLD


On Thursday, January 7, 2021 at 1:49:40 PM UTC-5 Salman Halim wrote:
I was thinking the same thing: unless a plugin
has expensive autocommands that trigger often, but do nothing (CursorHold, for example), the only time performance hit should be upon initial startup when it's loaded.

It is possible that a plugin defines mappings with ambiguity and that introduces a timeout for Vim to figure out which mapping to use, but that delay isn't caused by the hardware not being able to keep up. I occasionally get mapping collisions in new plugins that conflict with unused plugins or unused parts of plugins, which would be a good reason to only keep the plugins you actually use. 

Salman

On Thu, Jan 7, 2021, 13:30 Charles Campbell <[hidden email]> wrote:
I agree with gevisz: a plugin could have an impact on performance even
if not used. Just imagine that there's a busy wait loop that fires up
when the plugin is loaded -- it would just hog the machine (well, at
least a core).

Nonetheless, mostly what plugins do upon startup is:

   define functions
   define various mappings, commands

Vim, of course, does have to determine whether or not a given sequence
of symbols invokes a command, function, or mapping. There are a number
of ways to do this; some are log-m (m=qty characters in the string,
n=qty of strings), so adding in extra mappings, commands, and functions
should be negligible cost in time.

So, I would not expect unused plugins to exact a performance cost.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/a4eef4b6-3dfa-460c-82ac-2f4c9eb98d84n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

Christian Brabandt

On Do, 07 Jan 2021, David Lowry-Duda wrote:

> Aside from startup time (especially if plugins don't use autoload), unused plugins should barely affect speed. But I'll note that it's pretty straightforward to profile vim to see what is taking time and clock cycles, in case you want to actually examine one or more
> suspicious plugins and determine what is causing slowness.

However depending on where your plugins reside, it may take a
considerable amount of time to read in all your files. For that reason,
I am especially mad at vim-airline and vim-airline-themes.

This is slowing down starting up my editor in my WSL and I noticed the
same when my Vim installation was on a network share (possibly in
conjunction with some anti-virus application).

This is just annoying.

Best,
Christian
--
Die neue A-Klasse soll jetzt serienmäßig mit einem Überrollbügel
ausgerüstet werden.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210107191737.GD2910256%40256bit.org.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

rwmit...@gmail.com

I open MacVim once and leave it up for days, if not weeks.  Load and close files in tabs as needed.  Startup time is seldom an issue.
On Thursday, January 7, 2021 at 2:17:44 PM UTC-5 [hidden email] wrote:

On Do, 07 Jan 2021, David Lowry-Duda wrote:

> Aside from startup time (especially if plugins don't use autoload), unused plugins should barely affect speed. But I'll note that it's pretty straightforward to profile vim to see what is taking time and clock cycles, in case you want to actually examine one or more
> suspicious plugins and determine what is causing slowness.

However depending on where your plugins reside, it may take a
considerable amount of time to read in all your files. For that reason,
I am especially mad at vim-airline and vim-airline-themes.

This is slowing down starting up my editor in my WSL and I noticed the
same when my Vim installation was on a network share (possibly in
conjunction with some anti-virus application).

This is just annoying.

Best,
Christian
--
Die neue A-Klasse soll jetzt serienmäßig mit einem Überrollbügel
ausgerüstet werden.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ba748782-b74c-4dc8-b7e8-d9af95fbac71n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

meine
In reply to this post by meine
> Does anyone know if installed plugins affect the speed of Vim when they
> are not used?

Many Thanks for all your replies!

Wether Vim takes more memory and/or will react slower with plugins
active, I will have to find out, e.g. by monitoring htop and just
trying.

I'm not a very extensive plugin user and my box is relatively fast. It
was foremost a theoretical question, but further (and starting to use
more plugins) it could get an issue.

KR

//meine

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/X/jA2m0idxPw4PlA%40trackstand.
Reply | Threaded
Open this post in threaded view
|

Re: do plugins affect performance?

Salman Halim
My setup has over 150 plugins. Without a doubt, there are plenty I don't use and should probably go clean up. However, as I have a noticed a drop in any speed, I haven't bothered.

--

Salman

On Fri, Jan 8, 2021, 15:30 meine <[hidden email]> wrote:
> Does anyone know if installed plugins affect the speed of Vim when they
> are not used?

Many Thanks for all your replies!

Wether Vim takes more memory and/or will react slower with plugins
active, I will have to find out, e.g. by monitoring htop and just
trying.

I'm not a very extensive plugin user and my box is relatively fast. It
was foremost a theoretical question, but further (and starting to use
more plugins) it could get an issue.

KR

//meine

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/X/jA2m0idxPw4PlA%40trackstand.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfR6KPrmwhj%3D_E7v2u9pF34ziPvHL2gTTFOyJt3rTcM0Q%40mail.gmail.com.