elementor / wp2static-addon-s3

S3 deployment Add-on for WP2Static
The Unlicense
35 stars 23 forks source link

use aws s3 sync instead s3 put #25

Closed neoshadybeat closed 4 years ago

neoshadybeat commented 4 years ago

In order to speed up the deployment, use s3 sync instead of s3 put

leonstafford commented 4 years ago

Thanks @neoshadybeat for suggesting this! I think it makes sense and will look into it.

john-shaffer commented 4 years ago

sync is a CLI command that compares files to see which ones have changed and uploads those. The addon uses the SDK, not the CLI, and has its own (more efficient) logic for detecting which files need to be uploaded. Even if it were to shell out to sync, that would generally be slower than the current implementation.

leonstafford commented 4 years ago

Thanks for clarifying, @john-shaffer.

@neoshadybeat it may be worth benchmarking using the WP_CLI commands to detect, crawl and post_process, then time the deploy step vs deploying that same directory using sync (with/without caching also to compare). As @john-shaffer says, the plugin uses it's own caching, which doesn't need to compare with what's in S3 (I think the Netlify add-on still differs a bit in pulling a hash digest of all existing files regardless of what the plugin says has changed, so that one may have some more room for performance improvement).

Closing this one now. Also, just to confirm, if you're using WP2Static version 6.6.7 (latest official in wordpress.org), that is now this project, which should now also be using AWS ADK, but not as efficient caching as in this V7+ WP2Static.