4 ms·
Apart from what others have mentioned. If you are using NodeJS, it is optimized for I/O and not computation. Since it's single threaded and async at it's core
by sidcool 5y ago
Apart from what others have mentioned.
If you are using NodeJS, it is optimized for I/O and not computation. Since it's single threaded and async at it's core, any blocking computation will impact entire service.
One approach could be to profile your app using a myriad of node js profiling libraries. (https://nodejs.org/en/docs/guides/simple-profiling/ https://nodejs.org/en/docs/guides/simple-profiling/)
If you want a solution, try deploying your JS code as AWS Lambda or GCP Cloud Functions. They may address the issue at lower cost while you fix the issue.
- pototo666 5y agoThanks. I have never profiled my app before. Time to learn new skills :)