Slow require/import on serverless functions #525
Labels
code-generation
issue deals with generated code
difficulty: hard
fix is hard in difficulty
status: help wanted
requesting help from the community
type: community enhancement
feature request not on Twilio's roadmap
Issue Summary
Requiring the
twilio-node
library takes a few seconds when using it in a Docker container or in an own server setup, maybe the issue is not that important. Since it will load into memory and then it is available during the lifetime of the Node process.But if you want to use
twilio-node
in a serverless environment cold starts of the function can be done very often. It seems that all functions where we require/importtwilio-node
takes some time.Is there anyway to import parts of the
twilio-node
package instead of setting everything up? I think that may speed up the import/require. Or any other ideas?Steps to Reproduce
Exception/Log
On Firebase Cloud Function the execution takes:
Technical details:
The text was updated successfully, but these errors were encountered: