NodeJS provides a built-in profiler which allows developer to analyse and optimise their code. Official documentation and in-depth details can be found here.
node --prof index.jsisolate- to get a report of the activities by running: node --prof-process isolate-<rest_of_log_file_name>.log > processed.txtprocessed.txt file in your preferred editor, analyse the [Summary] section and identify Components/Sub-Sections that have a high number of ticks or increased percentage from the total.