How to avoid pauses when editing code on a network drive?

I plan to make more code from home, but for this I need to be able to edit files on the Samba drive on our dev server. The problem that I came across with several editors is that a network delay causes the editor to lock for long periods of time (Eclipse, TextMate). Some editors do this a lot better than others, but is there any file system or other settings I can make to minimize the impact of delay?

A few additional points:

  • There is a policy against the availability of company data on personal machines, so I would like not to check the code locally.
  • The console is on top of the PPTP VPN connection.
  • Installation on Linux or OS X client
+4
source share
4 answers

Use a version control system - Subversion, Perforce, Git, Mercurial, Bazaar, etc. - so you never edit the code on a shared server. Instead, you should edit the local workspace and make changes to the repository located on the network.

Also, convince your company to adapt its policy so that the corporate code is allowed on personal machines , if on an encrypted volume. Encrypted disk images that you can use for this are trivial to create with Disk Utility and can use strong cryptography. You can get even more security by not storing your encryption passphrase in your keychain, and instead enter it every time you mount an encrypted volume; this means that even if your local user account is compromised, if you do not have a volume installed, no one will be able to mount it.

I did this all the time when I was consulting, and not one of my clients, some of whom had similar rules regarding the company code, had ever encountered a problem when I explained how everything works. (I think some of them even started using encrypted disk images even in their offices.)

+9
source

The Remate plugin simply disables this terrible focus update feature.

Download, unzip, double-click and select "Disable updating when focus is restored" in the "Window" menu (you can manually update by right-clicking the project in the box). Voila!

+5
source

If you access data from your personal computer, it is located in your RAM, so we assume that you simply cannot store it on your hard drive, floppy disk, USB drive, etc.

Your solution is a RAM disk. Copy the files you need to edit there using any method you prefer (I would suggest a control source), and then you can edit them without delay. When you are done, return them to the server.

As stated, your editor can cache changes in your temp directory, or perhaps even your swap file (if it is in memory, then it can be replaced). The solution to this is to get a much larger RAM disk and run the virtual machine in a RAM drive. Not sure which OS you are using, but you can get a pretty fine-grained installation of most OSs if all you do is edit the source code.

If you do not have enough memory, then get a Gigabyte i-RAM solid state drive and remove the battery, so it will lose everything when disconnected.

Install VMWare so that it does not allow the OS to exchange any virtual machine. Save the base virtual machine to your hard drive and copy it to your RAM drive before downloading it. Then you can use the hard drive in the virtual machine as a hard drive, although this is RAM.

It might be a good idea to start a safe deletion on your RAM disk before turning off the power. Also keep in mind that they found that if you super cool the RAM chip before removing it from a working computer, and quickly put it on a new computer, the data may still be intact.

I think it all comes down to how detailed this policy is and how it is interpreted.

Good luck

+1
source

Short answer: you cannot do the trick. CIFS really focuses on a local area network with fairly quiet traffic, so you have no equal chance not to endure an intermittent lag from access to a share via a VPN. At some point, the editor needs to access the file while blocking I / O, because it makes no sense to do otherwise.

You can switch the editor and use Emacs + TRAMP , which is designed to work with remote files.

0
source

Source: https://habr.com/ru/post/1276475/


All Articles