Friday, September 3, 2021

Re: how to replace very slow html/css syntax plugin

On Do, 02 Sep 2021, Eike Rathke wrote:

> Hi,
>
> On Thursday, 2021-09-02 16:44:45 +0200, Christian Brabandt wrote:
>
> > Does fedora really ship
> > https://github.com/skammer/vim-css-color/blob/master/after/syntax/css.vim
> > as default css syntax plugin?
>
> No, the default is the https://github.com/jsit/css.vim one that
> redirects to https://github.com/vim-language-dept/css-syntax.vim and is
> the same as
> https://github.com/vim/vim/blob/master/runtime/syntax/css.vim you
> mentioned.
>
> There's an additional package vim-syntastic-css of
> https://github.com/vim-syntastic/syntastic that "runs files through
> external syntax checkers and displays any resulting errors", maybe
> that's installed and could explain some slowness.
>
> The skammer plugin was mentioned by the OP only because they just
> happened to have come across it on the net (citing from
> https://github.com/vim/vim/issues/8825 "As I was searching around found
> this with more or less the same problem").

Ah okay, makes sense. However, looking at the profile from
https://github.com/vim/vim/issues/8825

FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
294 1.590729 0.847627 67_Rgb2xterm()
224910 0.743102 67_pow()
2599 0.032777 67_PreviewCSSColorInLine()
147 1.598205 0.005605 67_SetNamedColor()
255 0.004275 67_Xterm2rgb()
147 0.001871 67_FGforBG()
3 0.000565 60_AddITags()
2 0.000613 0.000549 8_LoadFTPlugin()
1 0.000445 56_define_commands()
2 3.323722 0.000407 3_SynSet()
1 0.000316 0.000271 14_EchoFuncInitialize()
2 0.000208 HtmlIndent_CheckUserSettings()
2 0.000183 56_Map()
1 0.000220 0.000172 FugitiveExtractGitDir()
1 1.665048 0.000166 dist#ft#FThtml()
2 0.002720 0.000149 10_LoadIndent()
1 0.000215 0.000144 fugitive#Find()
1 0.000184 0.000099 56_TempReadPre()
5 0.000091 60_AddBlockTag()
1 0.001002 0.000084 fugitive#Init()

That indicates that script 67 in the output of `:scriptnames` is causing
some slowdown. So to the OP: please show the output of :scriptnames or
better, even use :67scriptnames and show the top of the file.

That function is not in the default syntax plugin for css files, so it
must come from somewhere else.

If that is causing problems, you might want to disable that script (or
delete it if you do not need it). Looks to me like some kind of
un-needed plugin that can be disabled and then Vim should be performant
again :)

Best,
Christian
--
Wie man sein Kind nicht nennen sollte:
Eugen Sinn

--
--
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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210903071922.GC1795913%40256bit.org.

No comments: