Whether Web Assembly or not, I hope that the Drupal trial experience will load for people in 30 seconds or less.
@phenaproxima #4, in the Slack thread, the significant motivator to me was this:
My question:
Will spinning up a Drupal site with that many modules take more than a minute no matter how fast we make the install process?
Mglaman's answer:
If thereโs 100+ batch steps itโll always take forever.
I ran an informal timing this morning. See screenshot for graphs.
- The current Demo experience from click to a usable site without adding a recipe: 320 seconds to usable site.
- Future, where we prebuild the database and move the recipe selector to be an optional step after we hit usable site: 25 seconds to usable site.
- Wordpress Playground: 11 seconds to usable site.
I think we should do both. We should speed up Drupal's install so that everyone else can benefit. And we should pre-build the demo baseline to get to a usable site in less than 30 seconds, and make the recipe installations and configuration changes optional after we have a usable site.
Adding this to the summary:
And if we are going to ship a preinstalled database, why not have the build script load the demo pages during build to pre-warm the cache for a snappy experience out of the box?
Related Slack thread starts here: https://drupal.slack.com/archives/C072BF486FN/p1728065173571019?thread_t...
adrian83 โ created an issue.
For the last year I had hoped to create an issue detailing my steps to get this working. Since that didn't happen, and I am forgetting the details, I will put some info here that could help a person get started.
First, I just re-found David's blog post about this. This could be included in the module's description and/or README. https://davidwbarratt.com/node/49
- Besides installing this module on your Drupal site, you will need to deploy this Cloudflare worker code in Cloudflare. https://github.com/davidbarratt/drupal-edge. Fork it, clone to local, run
npm install
,npm run build
, andnpm run deploy
. - Go into Cloudflare and bind a route to the worker. https://developers.cloudflare.com/workers/configuration/routing/routes. To match all routes,
*DOMAIN.com/*
- (I may have needed to set up Wrangler on my local?
- (I believe I installed the Purge and Cloudflare modules and enabled the Purge Core tags queuer and Cloudflare Worker Purge submodules.)
- Under the Purge UI in Drupal, add your Cloudflare worker as a layer of cache invalidation, for the URL: https://DOMAIN.com/.cloudflare/purge
I needed to debug issues. Drupal core contact forms broke page caching. A viewsreference field ๐ Viewsreference embeds Views without cache, breaking Dynamic page cache Fixed was breaking page caching. I still had issues where I needed to either clear Drupal or Cloudflare cache when updating content, which I did not troubleshoot because it is not a heavily-edited site.
Hopefully these notes can help someone.