pocketarc / git-deploy-php

git-deploy-php is a simple php-based tool that deploys your Git repositories to FTP/SFTP servers, and keeps them updated automatically.
http://brunodebarros.github.io/git-deploy-php
291 stars 45 forks source link

Parallel Transfers #9

Closed pocketarc closed 12 years ago

pocketarc commented 13 years ago

It occurs to me that the transfer speed could be increased greatly by simply running multiple file transfers at the same time. Would be nice to have some sort of multi-threading in place. Hmm, I wonder how this would be possible.

pocketarc commented 13 years ago

Just realised this is possible with ftp_nb_put and ftp_nb_continue. :D

vimishor commented 12 years ago

Sounds good, but FTP is not async, so that we can make parallel file transfer we need to open multiple FTP connections.

There are many companies that offer cheap hosting and they limit the number of simultaneous ftp connections. How to deal with that ?

pocketarc commented 12 years ago

Maybe even just having two connections instead of just one, that'd make a big difference, I believe. Maybe make the number of connections configurable, as one of the options in deploy.ini, with the default being 2.

pocketarc commented 12 years ago

Though to tell you the truth, on good Internet connections, I've found that speed isn't an issue at all, and that this "Parallel Transfers" thing is a bit of an unnecessary optimisation. Still, if it can be done, it'd be interesting to do it.

pocketarc commented 12 years ago

Not doing this; it's an unnecessary optimisation.