Skip to content

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

@kmaneshk

Description

@kmaneshk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions