Clinic flamegraph: trying to read graph to determine fixes

181 Views Asked by At

I used Clinic to create a flamegraph and I am seeing a lot of activity coming from Mongoose. A common theme seems to indicate that a lot of these calls seems to be "line: 1, column:1". On the surface, It seems like there are ways to optimize mongoose to fix this problem. Ideally, I would like to shorten the length of time Mongoose is running in this flamegraph as it seems long.

I am a beginner to flamegraph and am working to properly decipher it. Am I correct in assuming that Mongoose is taking up a lot more time than expected and if so, are there any settings I can utilize to fix the issue?

enter image description here

enter image description here

Update

The second graph came from me expanding the process that seemed to be the longest running function. The yellow flame at the top in the first graph. It seems like this is happening during the initial loading phase. When I expanded, the getModuleJob function seemed to be the longest running function. Granted, I am using the "type": "module" in package.json and the --experimental-modules set.

0

There are 0 best solutions below