Sunday, October 2, 2016

Re: Slow Python syntax highlighting

On 2 October 2016 at 22:29, Dominique Pellé wrote:
> Can you also try to measure it automatically as I did? Just to make
> sure that what I measure is what you also observe.

This is what I got with line 85 (the slow one):

% time vim -u ./vimrc --noplugin +85 -c 'norm! o' -c 'q!' foo.py
0.17s user 0.00s system 63% cpu 0.277 total

% time vim -u ./vimrc --noplugin +85 -c 'norm! o' -c 'q!' foo.py
0.14s user 0.03s system 63% cpu 0.272 total

% time vim -u ./vimrc --noplugin +85 -c 'norm! o' -c 'q!' foo.py
0.16s user 0.02s system 62% cpu 0.275 total


And this is for line 87 (the fast one):

% time vim -u ./vimrc --noplugin +87 -c 'norm! o' -c 'q!' foo.py
0.05s user 0.01s system 98% cpu 0.057 total

% time vim -u ./vimrc --noplugin +87 -c 'norm! o' -c 'q!' foo.py
0.05s user 0.00s system 32% cpu 0.149 total

% time vim -u ./vimrc --noplugin +87 -c 'norm! o' -c 'q!' foo.py
0.04s user 0.00s system 30% cpu 0.146 total


Visually I can tell that the second line executes faster than the
first one. Also note that I used 'o' and not 'O'. With 'O', line 87
takes more time but is still faster than line 85. There's not much
difference for line 85.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: