Thread: Re: setting default backup and swap dirs
Cream is a free, easy-to-use configuration of the Vim text editor
Brought to you by:
digitect
From: Steve H. <dig...@mi...> - 2005-05-12 21:27:51
|
From: Matt Wilkie, May 12, 2005 3:22 PM > Steve Hall wrote: > > On Wed, 2005-04-20 at 15:08 -0700, Matt Wilkie wrote: > > > > > > Cream's performance takes a dive when opening files on network > > > drives, even quite small ones. I think it might be because the > > > swap file is created in the same directory. How can I make that, > > > and backup ~ files, always go to a local disc? > > > > You can set $CREAM_SWP to override the default. > > Okay, I've done that and verified that the swap file is actually > being created on the local drive. As are views and backup files. > However it didn't cure the problem performance problem I'm having so > something else is wrong. > > Basically whenever I open a file on a network drive even simple > actions like moving the cursor up or down a line takes a second or > two. If I watch the network connection sys-tray icon (i'm on windows > xp), there is traffic with every key press. > > There doesn't seem to be any difference if the file is being > accessed through a mapped drive letter or via a UNC path. > > Do you have any suggestions? You might test turning off each of these options in turn: " turn off redraw set lazyredraw " turn off swap set noswapfile " turn off undo set undolevels=-1 " ignore autocmds set eventignore=all " unload buffers set nohidden Do any help? -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net |
From: Matt W. <mat...@go...> - 2005-05-13 15:48:44
|
> You might test turning off each of these options in turn: > > " turn off redraw > set lazyredraw > " turn off swap > set noswapfile > " turn off undo > set undolevels=-1 > " ignore autocmds > set eventignore=all > " unload buffers > set nohidden > > Do any help? Nope. But I did narrow it down some more: the poor performance only occurs on network files where I use the context menu to open. (Select > r-click> Edit with Cream/Vim). If I run Cream from the Quick Launch icon and then open network files there is no noticible lag at all. Curiously, there is still network traffic with every keypress. Why would there be any at all? (swap is still set to a local drive) -- matt wilkie -------------------------------------------- Geographic Information, Information Management and Technology, Yukon Department of Environment 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9 867-667-8133 Tel * 867-393-7003 Fax -------------------------------------------- |
From: Steve H. <dig...@mi...> - 2005-05-14 03:06:52
|
On Fri, 2005-05-13 at 08:46 -0700, Matt Wilkie wrote: > [...] > Nope. But I did narrow it down some more: the poor performance only > occurs on network files where I use the context menu to open. > (Select > r-click> Edit with Cream/Vim). If I run Cream from the > Quick Launch icon and then open network files there is no noticible > lag at all. Curiously, there is still network traffic with every > keypress. Why would there be any at all? (swap is still set to a > local drive) I still think this is some kind of a path issue. Internally, Vim uses unix format, path seperators are slashes. There are times when this all gets confused in my experience, especially on Windows network drives. I wouldn't be surprised if Vim checks filestate on very short intervals, explaining the network traffic on keystrokes. (Remember, even the most simple Cream keystrokes are actually a complex structure of key capture, map, mode change, function, mode return.) When you have this problem, try the command :buffers! and look closely at the paths shown. Are they well-formed? Is there something unique about the paths that show the behavior? (Spaces or odd characters.) -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net |
From: Matt W. <mat...@go...> - 2005-05-17 18:56:20
|
> When you have this problem, try the command :buffers! and look closely > at the paths shown. Are they well-formed? Is there something unique > about the paths that show the behavior? (Spaces or odd characters.) There is no path info at all: :buffers! 1 %a "testfile.txt" line 31 contrasted with the same file being opened using File > Open: :buffers! 1 %a "//server/share/dir1/dir2/testfile.txt" line 1 -- matt wilkie -------------------------------------------- Geographic Information, Information Management and Technology, Yukon Department of Environment 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9 867-667-8133 Tel * 867-393-7003 Fax -------------------------------------------- |
From: Steve H. <dig...@mi...> - 2005-05-18 01:19:49
|
On Tue, 2005-05-17 at 11:38 -0700, Matt Wilkie wrote: > > > But I did narrow it down some more: the poor performance only > > > occurs on network files where I use the context menu to open. > > > (Select r-click> Edit with Cream/Vim). If I run Cream from the > > > Quick Launch icon and then open network files there is no > > > noticible lag at all. Curiously, there is still network traffic > > > with every keypress. Why would there be any at all? (swap is > > > still set to a local drive) > > > > When you have this problem, try the command :buffers! and look > > closely at the paths shown. Are they well-formed? Is there > > something unique about the paths that show the behavior? (Spaces > > or odd characters.) > > There is no path info at all: > > :buffers! > 1 %a "testfile.txt" line 31 > > contrasted with the same file being opened using File > Open: > > :buffers! > 1 %a "//server/share/dir1/dir2/testfile.txt" line 1 Can you compare open the same file via the context menu entry when the location is a mapped drive and when it is a UNC path? I'll try to test this tomorrow myself, too. Cream uses a registry entry to accomplish this. From the gvim.nsi build script for our Nullsoft installer: WriteRegStr HKCR "*\Shell\Cream\Command" "" "$\"$0\gvim.exe$\" $\"-u$\" $\"$0\cream\creamrc$\" $\"%1$\"" All that matters is the last argument where %1 is passed as the path. For a Windows UNC path, the first two chars are "\\" indicating a server. But to Vim, this is an escaped backslash, which reduces it to only a single backslash, no longer the same meaning on Windows. If we can reproduce this, perhaps you can test alternatives so that both slashes are comprehended correctly. I'll be offline for a week shortly, we'll have to finalize patches after that. -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net |
From: Matt W. <mat...@go...> - 2005-05-18 18:47:59
|
> Can you compare open the same file via the context menu entry when the > location is a mapped drive and when it is a UNC path? I'll try to test > this tomorrow myself, too. There is no difference with either perfomance or output of :buffer! between UNC path and mapped netowrk drive letters. In both cases perfomance sucks and there is no path info. The same is true for extensions which are registered to Cream (2x-click and they open in Cream). > Cream uses a registry entry to accomplish this. From the gvim.nsi > build script for our Nullsoft installer: > > WriteRegStr HKCR "*\Shell\Cream\Command" "" "$\"$0\gvim.exe$\" $\"-u$\" > $\"$0\cream\creamrc$\" $\"%1$\"" my HKCR\*\Shell\Cream\Command is (all on one line): "c:\local\vim\vim63\gvim.exe" "-u" "c:\local\vim\vim63\cream\creamrc" "%1" -- matt wilkie -------------------------------------------- Geographic Information, Information Management and Technology, Yukon Department of Environment 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9 867-667-8133 Tel * 867-393-7003 Fax -------------------------------------------- |
From: Matt W. <mat...@go...> - 2005-05-19 19:32:40
|
Hi Steve, A further symptom is that 'File > Open' only works without a perfomance loss if Cream is started by the StartMenu or QuickLaunch. If I initially start cream by 2x-clicking on a file, all further files opened in that session will also suffer perfomance problems. If I start cream from the menu even drag and drop files show no performance loss. The title bar always shows the full path to the file, in backslash notation, regardless of invocation method, while the status bar at the problem shows the same path information provided by :buffers! regards, -- matt wilkie -------------------------------------------- Geographic Information, Information Management and Technology, Yukon Department of Environment 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9 867-667-8133 Tel * 867-393-7003 Fax -------------------------------------------- |
From: Steve H. <dig...@mi...> - 2005-06-02 03:04:27
|
On Thu, 2005-05-19 at 11:59 -0700, Matt Wilkie wrote: > Hi Steve, > > A further symptom is that 'File > Open' only works without a > perfomance loss if Cream is started by the StartMenu or QuickLaunch. > If I initially start cream by 2x-clicking on a file, all further > files opened in that session will also suffer perfomance problems. > > If I start cream from the menu even drag and drop files show no > performance loss. > > The title bar always shows the full path to the file, in backslash > notation, regardless of invocation method, while the status bar at > the problem shows the same path information provided by :buffers! Matt, sorry for the delayed response, I'm just getting uncovered after being away. I still think it's the same problem as before: Vim is mis-understanding the preceeding two backslashes that WinXP uses to distinguish a UNC server path. Both methods you list as problematic involve the OS passing that raw path name to Vim. In other methods, Vim gets a shot at re-interpreting it before trying to open. (BTW, I would bet recent version of Windows pass the UNC path even for a drive letter, which explains why there's no difference.) If this guess is correct, your problem is actually a Vim one, not Cream. But either way, I don't understand why I can't reproduce it. Are these Samba shares? Could it be some sort of Active Directory behavior? I would think it should be reproducable by using :e \\server\path\to\filename at the command line to edit files, but I can't see it. -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net |
From: Matt W. <mat...@go...> - 2005-06-02 19:43:03
|
> Matt, sorry for the delayed response, I'm just getting uncovered after > being away. No problem, I knew you were away and you've always followed up on past reports. :) > If this guess is correct, your problem is actually a Vim one, not > Cream. But either way, I don't understand why I can't reproduce it. > Are these Samba shares? Could it be some sort of Active Directory > behavior? Nope not specific to Samba or Active Directory. This is a mixed network, some NT 4 servers, some AD, and some samba. The vim/cream lag on the samba server is noticeably longer than an AD or NT server but that could be because it is quite a bit farther away from me (a few kms). > ...I would think it should be reproducable by using > :e \\server\path\to\filename > > at the command line to edit files, but I can't see it. Nope, opening a network file with :e doesn't show the lag. Now what? -- matt wilkie -------------------------------------------- Geographic Information, Information Management and Technology, Yukon Department of Environment 10 Burns Road * Whitehorse, Yukon * Y1A 4Y9 867-667-8133 Tel * 867-393-7003 Fax -------------------------------------------- |
From: Steve H. <dig...@mi...> - 2005-06-17 02:57:26
|
On Thu, 2005-06-02 at 12:40 -0700, Matt Wilkie wrote: > > > ...I would think it should be reproducable by using > > > > :e \\server\path\to\filename > > > > at the command line to edit files, but I can't see it. > > Nope, opening a network file with :e doesn't show the lag. > > Now what? Still not dead yet. :) Ok, I've gone back and re-stated the facts: o PROBLEM: Network files o PROBLEM: Windows XP o PROBLEM: Double-clicking file (all further files that session) o PROBLEM: output of :buffers! does not indicate path: 1 %a "testfile.txt" line 31 o PROBLEM: context menu used to open. (Edit with Cream/Vim). o No problem: file size o No problem: Swap file local o No problem: Views or backup files local o No problem: Mapped drive letter v. UNC path (both same) o No problem: turn off redraw (set lazyredraw) o No problem: turn off swap (set noswapfile) o No problem: turn off undo (set undolevels=-1) o No problem: ignore autocmds (set eventignore=all) o No problem: unload buffers (set nohidden) o No problem: Cream started by StartMenu or QuickLaunch (File > Open) o No problem: drag and drop files [on Cream] o No problem: Network traffic indicated on keypresses in either case. Accurate? Is this reproducable 100%? I'm going to test one more time tomorrow if I can see it. If not, I might have to write you some custom debugging code to get feedback on what is happening. -- Steve Hall [ digitect mindspring com ] :: Cream... something good to put in your Vim! :: http://cream.sourceforge.net |