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

Scanning and comparing files in Jotta folders is slow #144

Open
andersolav opened this issue Jul 24, 2017 · 0 comments
Open

Scanning and comparing files in Jotta folders is slow #144

andersolav opened this issue Jul 24, 2017 · 0 comments

Comments

@andersolav
Copy link

I experienced a very slow comparing of files. I have a backup comparing approx. 50.000 files (with jotta-scanner) that used approx. for 4-5 hours to finish. With a proposed changed the same backup took half an hour.

I found that the compare functions makes a request to Jotta for each file. I have suggestion (code) that that reads the files for one whole folder at a time. This should be Ok also considering simultanous changes to the files beeing compared.

Change to scanner.py's filescanner:
if len(bothplaces): log.debug("Caching MD5 hash for all files in Jotta folder %s in one request", jottafolderpath) jfolder = jfs.getObject(jottafolderpath) jfolderfiles = {} for jf in jfolder.files(): jfilekey = jottafolderpath+"/"+jf.name # TODO neccessery to use jottacloud.get_jottapath ? jfolderfiles[jfilekey] = jf

Also jottacloud.py needs to read from the new jfolderfiles and a new return parameter "jottafoldepath" must be passed from the "compare" function.

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

No branches or pull requests

1 participant