Re: Runtime of record/play feature

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Runtime of record/play feature

Manas Gupta
Hi, I was recently working on a large CSV file in Vim. I needed to do
some changes in the file and I utilized the recording feature for it.
Recording feature is really awesome and worked well for my use case.

However working on a file whenever applied on multiple lines, it is slow
till the point where we can actually see the edit being done on every line.

I would like to know why is it so slow? Has it something to do with the
design pattern?

Also, is there any consideration of making it faster (if possible)?

--
Manas
Computer Science Undergrad.
IIIT-Delhi 2022

--
--
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/24a4b266-2795-613f-0aa2-2745e2d4dd36%40iiitd.ac.in.
Reply | Threaded
Open this post in threaded view
|

Re: Runtime of record/play feature

JohnBeckett

> a large CSV file


Roughly how many megabytes? Roughly how long is each line?

Is syntax highlighting active? If so, try disabling the filetype:


:setl ft=


John

--
--
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/4aa305eb-0228-48fd-aee4-837a407d09ec%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Runtime of record/play feature

Manas Gupta

> Roughly how many megabytes? Roughly how long is each line?

I do not exactly remember the size as it was some weeks ago but it was a
2000 line csv (not so big). And it was having around 10 columns.


> Is syntax highlighting active? If so, try disabling the filetype:
>
>
> :setl ft=

Yes, syntax highlighting is active. I used another csv file to do some
fair amount of editing but by disabling filetype I could not see any
major differences in runtime of edit. Although in vanilla vim it's fast
enough.


> Also try LargeFile:
> https://www.vim.org/scripts/script.php?script_id=1506
Really thanks for this.

--
Manas
Undergrad. | 2022

--
--
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/00db5aaf-b110-6848-b078-18f7eeb3cec1%40iiitd.ac.in.
Reply | Threaded
Open this post in threaded view
|

Re: Runtime of record/play feature

Eli the Bearded
In reply to this post by Manas Gupta

Manas <[hidden email]> wrote:

> Hi, I was recently working on a large CSV file in Vim. I needed to do
> some changes in the file and I utilized the recording feature for it.
> Recording feature is really awesome and worked well for my use case.
>
> However working on a file whenever applied on multiple lines, it is slow
> till the point where we can actually see the edit being done on every line.
>
> I would like to know why is it so slow? Has it something to do with the
> design pattern?
>
> Also, is there any consideration of making it faster (if possible)?

It's not exactly clear what the problem is based on your limited
description, but my guess is that you are operating on a file that is
huge relative to available RAM and the system is starting to swap to
accommodate the state save for the undo command.

If that's it, disabling undo before you run it might be a good idea.
Usually when I hit that limit, I switch to editing via Perl filter.
The undo.txt help file has a section on "undo-remarks" that provides
guidance on disabling undo effectively to avoid the memory hit.

Elijah

--
--
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/49NJln4kGszfYt%40panix5.panix.com.
Reply | Threaded
Open this post in threaded view
|

Re: Runtime of record/play feature

Christian Brabandt
In reply to this post by Manas Gupta

On Do, 14 Mai 2020, Manas wrote:

> Hi, I was recently working on a large CSV file in Vim. I needed to do some
> changes in the file and I utilized the recording feature for it. Recording
> feature is really awesome and worked well for my use case.
>
> However working on a file whenever applied on multiple lines, it is slow
> till the point where we can actually see the edit being done on every line.
>
> I would like to know why is it so slow? Has it something to do with the
> design pattern?
>
> Also, is there any consideration of making it faster (if possible)?

Have you tried :set lazyredraw?
What also helps, is switching away from Vim, (e.g. in a terminal
multiplexer move to a different pane, in the gui, simply minimize the
vim window), so that Vim is not busy redrawing

Best,
Christian
--
Bevor ich ein alter Mann wurde, war ich darauf bedacht, würdig zu
leben. Jetzt, im Alter, richtet sich mein Streben darauf, würdig zu
sterben.
                -- Lucius Annaeus Seneca (an Lucilius)

--
--
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/20200514194414.GG2077%40256bit.org.