I'm using Google Cloud Run to deploy my Express server, with routes generated by tsoa.
But I'm having an issue related to cold starts. When a new container is started, registering tsoa routes takes too much time and considerably slows the container startup time. Based on the profiling, it seems that importing the RegisterRoutes is the most time-consuming part.
Are there any approaches I could use to reduce the time it takes to import the RegisterRoutes method and register the routes while starting the Express server?
Thanks!
Sorting
I'm submitting a ...
[ ] bug report
[ ] feature request
[x] support request
I confirm that I
[x] used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
Routes are registered fast and don't impact server cold starts.
Current Behavior
Importing the RegisterRoutes function and calling it takes 5 to 6 seconds, in the compiled version.
Context (Environment)
Version of the library: 6.2.1
Version of NodeJS: 18
Hello!
I'm using Google Cloud Run to deploy my Express server, with routes generated by tsoa.
But I'm having an issue related to cold starts. When a new container is started, registering tsoa routes takes too much time and considerably slows the container startup time. Based on the profiling, it seems that importing the
RegisterRoutes
is the most time-consuming part.Are there any approaches I could use to reduce the time it takes to import the
RegisterRoutes
method and register the routes while starting the Express server?Thanks!
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
Routes are registered fast and don't impact server cold starts.
Current Behavior
Importing the
RegisterRoutes
function and calling it takes 5 to 6 seconds, in the compiled version.Context (Environment)
Version of the library: 6.2.1 Version of NodeJS: 18