Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficiency enhancement + Progress.js failed for streams that not support 'clearLine' method. #7

Merged
merged 2 commits into from
Jul 25, 2015

Conversation

zhangjyr
Copy link
Contributor

For larger storage syncronization (my case containes 3.4G file), delete "trash" and recreate md5 signature for all file consumes too much time. I invested into the ncp code and opened options "clobber" and "modified" to utilize the ability to filter the files by comparing the modification time of original file and "trash" file, which reduce "trash" time to 30s in my case.
PS. I add a profiler to show actural cost for every steps.
PS. Important! When I redirect stdout to file, which not support "clearLine" clearly, osync crashes. This request solved this bug.

Enhance efficiency for large storage by filter files by modified time.
Now trash directory will not be removed every time.
Add profiler to evaluate script efficiency.
Add logs to be more informative.
mehwww added a commit that referenced this pull request Jul 25, 2015
Efficiency enhancement + Progress.js failed for streams that not support 'clearLine' method.
@mehwww mehwww merged commit f5f970d into mehwww:master Jul 25, 2015
@mehwww
Copy link
Owner

mehwww commented Jul 25, 2015

This will make those delete objects undetectable which against the 'sync'. What do you mean 3.4G file which is one big file or a mass of small file? Honestly I didn't consider complex situation at first, maybe we can specified the program behavior by adding some command line flag.

Thanks for the pr though!

@zhangjyr
Copy link
Contributor Author

I see, 3.4G is the total size of a mass of small file. Sorry for the bug introduced by my pr. In my case, deletion is not a problem for the 'sync', just like 'rsync' service without the '--delete' option. I think a command line argument for such application is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants