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

Ensuring that the folder is present makes gulp-spsync really slow #10

Open
kmaneshk opened this issue Sep 9, 2016 · 3 comments
Open

Comments

@kmaneshk
Copy link
Contributor

kmaneshk commented Sep 9, 2016

Now gulp-spsync checks if the folder is present before trying to upload the file and if the folder is missing it creates the folder and uploads the file into it. But checking for the folders each time a deployment is triggered is time consuming as each segment (subfolder) of the address needs to be verified with the help of a web service and confirmed.

A slightly better approach would be to -

  1. Attempt checking for the presence of the folder only on upload failure, ie, the script could safely assume that the folder is present as that would be the case 99 % of the time. Obviously this would make the first run slower, but every run after that would not get bogged down by the folder presence check

  2. Now in the case where more than one file is uploaded to a folder, the presence of the folder is checked for each file, triggering (number_of_files_in_folder * number_of_subfolders_in_path) web service calls for each folder. This can be simplified by keeping track of the paths verified in memeory

Happy to make these changes if you are ok with these @wictorwilen. Let me know.

@madenorth
Copy link

Hi kmaneshk
Implementing 2 mean it would only check once per folder anyway, that should speed it up dramatically. Would that be enough?

@kmaneshk
Copy link
Contributor Author

kmaneshk commented Sep 11, 2016

hi @oozoo-solutions, 2 alone would give us good performance improvements, but both 1 and 2 combined would make spsync as fast as it used to be earlier.

If you are interested in doing 2 please go ahead. Let me know if you need help testing your code.

@madenorth
Copy link

hi @kmaneshk, sorry I don't have time at the moment. Feel free to do it though if you think it will make performance better.

thanks

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