I have tried to use get method in my Node.js CRUD application. It too much time to load in the localhost server.
3
Avoid fetching all data at once; fetch a subset using LIMIT and OFFSET
You should investigate about inefficient code.
Possible cause: 1. Synchronous operations such as fs.readFileSync or JSON.parse for large payloads, block the event loop and delay responses. 2. Complex computation performed on the main thread instead of offloading to a worker thread.
Share the code then I can suggest some solution for this .
Click here to cancel reply.
3
Answers
Avoid fetching all data at once; fetch a subset using LIMIT and OFFSET
You should investigate about inefficient code.
Possible cause: 1. Synchronous operations such as fs.readFileSync or JSON.parse for large payloads, block the event loop and delay responses.
2. Complex computation performed on the main thread instead of offloading to a worker thread.
Share the code then I can suggest some solution for this .