node.js – How to profile NodeJS files imports

In one of our applications, we need to optimize the startup time.

Is there a way to profile a Node.js application to see which files are being imported and how long these imports take?

Ideally, it would show a dependency import tree so that we can decide where to optimize these imports through dynamic importing.

We tried the –prof and –prof-process profiling options available in Node.js, but there is no profiling information from the application startup time.

Thanks for any suggestions

Read more here: Source link