[V4] Eager-loading performance #2199
victorLessa
started this conversation in
General
Replies: 2 comments 1 reply
-
Hmm, would be interesting to see, if same thing appears in V5 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hard to comment without looking at the code and the process you used for monitoring the event loop. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Lastly I went through some performance problems using Lucid, where it generated a node.js I / O lock preventing other calls from being executed
I came to this conclusion after reading https://nodejs.org/en/docs/guides/dont-block-the-event-loop/
and perform a profilling series in production and using a package to track the IO blocking time
https://github.com/naugtur/blocked-at#readme
(Great package) With this research I was able to notice that the lodash forEach, used by Lucid to carry out the relationships caused a rough block in the IO. Something that is not indicated according to the Node.js documentation
I solved my problem by breaking my query with lucid into smaller charges. Before my queries returned more than 1000 records causing 9 second crashes in the Node.js IO, according to the Naugtur package.
I would like to know if anyone in the community went through this, if so, how did they resolve it?
And I would like to raise a discussion about the possibility of revising Lucid to prevent this from happening on large projects, as is my case, or even adding an alert in the Lucid documentation.
Beta Was this translation helpful? Give feedback.
All reactions