UrielCh / opencv4nodejs

ESM Nodejs bindings to OpenCV 3/4
MIT License
254 stars 51 forks source link

Slow Response Time - OpenCV and Express.js #126

Open krzychuuu132 opened 9 months ago

krzychuuu132 commented 9 months ago

Hello,

I've deployed an Express.js application with OpenCV using the @opencv4nodejs module on https://dashboard.render.com/ with the Starter plan of 0.5 CPU and 512 MB of RAM.

I faced significant challenges during the build process due to the long build time and resources consumed by this library, but I eventually succeeded. I created an endpoint in Express.js where I perform object detection, retrieve the position of the detected object, and return the response.

However, the issue arises with the response time, as I need to wait for up to 9 seconds to receive the data, whereas in my application, I require data from this endpoint every 2 seconds. Is this even feasible? Or perhaps I'm doing something wrong and there's a way to optimize it? It's possible that I'm using too weak a server for this type of operation ?