> :loudspeaker: Update: StaticSite now deploys ...
# general
f
📢 Update: StaticSite now deploys faster
There have been growing complaints that the
StaticSite
and
ReactStaticSite
constructs are slow to deploy. We made some changes to how they are deployed to speed this up. You can read more about the changes here: https://github.com/serverless-stack/serverless-stack/releases/tag/v0.61.3 We also added a
waitForInvalidation
option. Cache invalidation can sometimes take more than 5 mins. For non-prod environments it might make sense to set this as 
false
. That’ll skip waiting for the cache to invalidate and further speed up the deploy process.
m
This sounds amazing. are there some benchmarks to get a feeling for how long lets say an “empty” create react app takes to deploy?
a
As I understand, cache invalidation isn't needed with modern SPA when we set index.html not to cache and all other files get a new hash when they change. Sound right?
j
Yeah it depends on the SPA builder you are using. Most of them generate hashed assets.
f
@Marc Höffl I don’t have specific numbers, if you have
waitForInvalidation
set to false, a empty/small CRA app takes 30s-1m to deploy i’d guess.
a
My 2MB deployment on a slow uplink takes just under a minute. (without waiting for invalidaiton)
f
@Adam Fanello yeah that’s right. For CRA, a couple other files do not have hashed names as well, ie.
favicon.ico
a
All good. I misunderstood earlier that the option wouldn't do an invalidation. Realized that it just isn't waiting for it to complete. 👍
m
Those 30s -1m are just the “upload” it does not include the build time, or does it?
a
Correct. Build time remains the same.