Firebase Functions: deployment too slow v2, Node 18, EU

We have a project running since three years using Firebase Functions. All the functions were still in the version 1 (Node 14) until recently. Now we migrate them to the version 2 (with Node 18), which should bring performance enhancements. Also, our project is hosted in Europe.

The question is that now we are experiencing a long time to deploy the functions. It works, but it takes a good amount of time.

Thanks for any help!

1 1 222
1 REPLY 1

Hi @limajr,

Welcome to Google Cloud Community!

Possible reasons for slowness:

  • Cold starts from infrequent deployments.
  • Increased package size from Node 18 dependencies.
  • Network lag in your EU connection.
  • Resource limitations in your free tier Firebase project.
  • Issues during package installation or memory constraints.

Tips for faster deployments:

  • Optimize packages and minimize size.
  • Enable source code caching for reused dependencies.
  • Pre-build local dependencies and upload them.
  • Deploy smaller batches of functions instead of all at once.
  • Use asynchronous invocations like Cloud Pub/Sub for warm functions.
  • Monitor deployments and analyze Cloud Build logs for troubleshooting.

By identifying the cause and implementing these suggestions, you should see faster deployments for your Firebase Functions v2 in the EU region.