Author Topic: Make uploads really immediate - possible?  (Read 1788 times)

chodorowicz

  • Jr. Member
  • **
  • Posts: 5
Make uploads really immediate - possible?
« on: April 18, 2015, 11:25:35 AM »
I'm working sometimes (more often that I'd like to) with such workflow that I'm editing local files and immediately uploading them to server and watching changes on live server. It was quite easy to configure on Windows using WinSCP or on Mac using some custom nodejs watcher / uploader ( https://github.com/hitsthings/node-live-ftp-upload ). I want to achieve similar immediate-upload effect with Yummy FTP Watcher, but unfortunately it doesn't work.

It seems those other programs are using FS system events for being notified that file was changed so they can in that way upload them with 0 delay. Yummy seems to use mechanism of rescanning folders every X seconds/minutes which must be obviously slower. Event when I set up watched for 'rescan every 1 second' the delays become sometimes really long (5 seconds or longer).

Am I missing something? If not can you implement real immediate upload feature? I think no other mac program has that so that would be great feature for Yummy FTP watcher. I shouldn't be also to difficult since such a short node script achieves that

Below are the lines which achieve file system events in real time for the mentioned node script.

Code: [Select]
function watchRecursive(dir, opts, onchange, cb) {
    fs.watch(dir, opts, function(event, filename) {
        onchange(event, filename, path.join(dir, filename));
    });
    fs.readdir(dir, function(err, files) {
        function recurse(file, cb) {
            file = path.join(dir, file);
            fs.stat(file, function(err, stat) {
                if (err) return cb(err);

                if (stat.isDirectory()) {
                    return watchRecursive(file, opts, onchange, cb);
                }

                return cb();
            });
        }
        async.each(files, recurse, cb);
    });
}

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2726
Re: Make uploads really immediate - possible?
« Reply #1 on: April 18, 2015, 01:51:53 PM »
Just for the record, there is a lot more to it than just those few lines, or at least it is for me in Xcode developing for OS X. If was trivial I would have added it already, believe me ;)

I have this on my To Do list as an enhancement for the very near future!

chodorowicz

  • Jr. Member
  • **
  • Posts: 5
Re: Make uploads really immediate - possible?
« Reply #2 on: April 18, 2015, 02:29:26 PM »
Sweet! I'll be waiting for this feature impatiently ;)

Heh, I have zero Xcode experience so, yeah, as you say, most probably it's more difficult.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2726
Re: Make uploads really immediate - possible?
« Reply #3 on: May 29, 2015, 12:20:49 PM »
Good news! Coming soon ;)

chodorowicz

  • Jr. Member
  • **
  • Posts: 5
Re: Make uploads really immediate - possible?
« Reply #4 on: May 31, 2016, 12:20:42 AM »
Any new on that? It'd be still a veeeery welcome addition.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2726
Re: Make uploads really immediate - possible?
« Reply #5 on: May 31, 2016, 08:01:56 AM »
You should see a huge improvement in v2.2.7 if the FSEvents option is enabled in your Watcher setup?

chodorowicz

  • Jr. Member
  • **
  • Posts: 5
Re: Make uploads really immediate - possible?
« Reply #6 on: June 10, 2016, 07:06:59 PM »
Hey JD! So, I've bought the licence to check it out (since my trial ended obviously in the meantime).
So, unfortunately this not working well at all... sorry. Between saving file and it being uploaded it takes around 18 seconds for me. Half of it I'm waiting for the watcher to pick up the change (FSEvents trigger rescan is checked) and 2nd half goes to rescanning and uploading.
The functionality I'm after should be really almost immediate. FSEvent shouldn't trigger rescan, but just upload that single file that was changed. I don't want check all other files in this scenario... As I mentioned WinSCP manages to do it in 1-2 seconds max.
Thanks for working on that and I hope you will be able to add this kind of functionality sometime in the future.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2726
Re: Make uploads really immediate - possible?
« Reply #7 on: June 10, 2016, 08:10:26 PM »
I'm definitely going to get that improved. Right now the FSEvent triggers a rescan, which is much more responsive than previously, but I have yet to add the direct item changed method. Thanks for the purchase! I'll be sure to make it worth your while :)

chodorowicz

  • Jr. Member
  • **
  • Posts: 5
Re: Make uploads really immediate - possible?
« Reply #8 on: June 13, 2016, 10:12:36 PM »
Great, thanks! I'm already using with much pleasure and success your Yummy FTP Pro, so your software was already much more than worth it's price. Greets!

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2726
Re: Make uploads really immediate - possible?
« Reply #9 on: June 14, 2016, 12:17:41 PM »
Cheers!  :)