<p>I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of time (Eclipse, TextMate). Some editors cope with this a lot better than others, but are there any file system or other tweaks I can make to minimize the impact of lag?</p>

<p>A few additional points:</p>

<ul>
<li>There's a policy against having company data on personal machines, so I'd like to avoid checking out the code locally.</li>
<li>The mount is over a PPTP VPN connection.</li>
<li>Mounting to Linux or OS X client</li>
</ul>

[{'answer_id': 33847, 'author': 'Chris Hanson', 'author_id': 714, 'author_profile': 'https://Stackoverflow.com/users/714', 'pm_score': 4, 'selected': True, 'text': "<p>Use a source control system — Subversion, Perforce, Git, Mercurial, Bazaar, etc. — so you're never editing code on a shared server.  Instead you should be editing a local work area and committing changes to a repository located on the network.</p>\n\n<p>Also, convince your company to adapt their policy such that company code is allowed on personal machines <strong>if</strong> it's on an encrypted volume.  Encrypted disk images that you can use for this are <em>trivial</em> to create using Disk Utility, and can use strong cryptography.  You can get even more security by not storing your encryption passphrase in your keychain, and instead typing it every time you mount the encrypted volume; this means that even if your local user account is compromised, as long as you don't have the volume mounted, nobody else will be able to mount it.</p>\n\n<p>I did this all the time when I was consulting and none of my clients — some of whom had similar rules about company code — ever had a problem with it once I explained how things worked.  (I think some of them even started using encrypted disk images even within their offices.)</p>\n"}, {'answer_id': 33891, 'author': 'Damien B', 'author_id': 3069, 'author_profile': 'https://Stackoverflow.com/users/3069', 'pm_score': 0, 'selected': False, 'text': '<p>Short answer: you can do no trick. CIFS is really geared towards LAN with a reasonably calm trafic, so you have zero chance to not suffer intermittent lag accessing a share through a VPN. The editor at some point needs to access the file in blocking IO, because it makes no real sense to do otherwise.</p>\n\n<p>You could switch editor and use Emacs + <a href="http://www.gnu.org/software/tramp/" rel="nofollow noreferrer">TRAMP</a> which is geared to work on remote files.</p>\n'}, {'answer_id': 33911, 'author': 'Jim McKeeth', 'author_id': 255, 'author_profile': 'https://Stackoverflow.com/users/255', 'pm_score': 1, 'selected': False, 'text': "<p>If you are accessing the data from your personal computer, it is in your RAM, so we will assume that you just can't store it on your hard drive, floppy, USB stick, etc.</p>\n\n<p>Your solution is a RAM drive.  Copy the files you need to edit there using whatever method you prefer (I would suggest source control) and then you can edit them without lag.  When you are done commit them back to the server.  </p>\n\n<p>As was pointed out your editor may be caching changes to your temp directory, or maybe even your swap file (if it is in memory, then it can get swapped out).  The solution to that is get a much larger RAM drive and run a Virtual Machine in the RAM drive.  Not sure what OS you are running, but you can get a pretty slim install of most OS's if all you are doing is editing source code.</p>\n\n<p>If you don't have enough RAM, then get a Gigabyte i-RAM solid state drive and remove the battery, that way it will lose everything when you power down.</p>\n\n<p>Set your VMWare to not allow the OS to swap any of the virtual machine.  Keep a baseline VM on your hard drive and copy it to your RAM drive before booting it up.  Then you can use the hard drive in the VM like a hard drive, even though it is RAM.</p>\n\n<p>Might be a good idea to run a secure erase on your RAM drive before powering down.  Also keep in mind that they have found if you super cool a RAM chip before removing it from a functioning computer, and place it in a new computer quick enough, the data may still be intact.  </p>\n\n<p>I guess it all comes down to how detailed that policy is, and how it is interpreted.  </p>\n\n<p>Good luck!</p>\n"}, {'answer_id': 223888, 'author': 'Kornel', 'author_id': 27009, 'author_profile': 'https://Stackoverflow.com/users/27009', 'pm_score': 3, 'selected': False, 'text': '<p><a href="http://ciaranwal.sh/remate/" rel="nofollow noreferrer">Remate</a> plugin simply disables this dreadful refresh-on-focus feature.</p>\n\n<p>Download, unpack, doubleclick and choose "Disable Refresh on Regaining Focus" from "Window" menu (you can refresh manually by right-clicking project in drawer). Voila!</p>\n'}]
['https://Stackoverflow.com/questions/33843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2567/']