mockserver-node icon indicating copy to clipboard operation
mockserver-node copied to clipboard

Glob is too hungry / very slow

Open OliverJAsh opened this issue 4 years ago • 1 comments

When I run my Node process which uses mockserver-node, it is very slow to start. After some debugging I discovered this is because there are a number of synchronous glob calls in the form of glob('**/abc). The ** part was very expensive for us because it was checking every folder in node_modules which is a huge folder.

To fix this I would suggest changing ** to node_modules/mockserver-node.

OliverJAsh avatar Jun 23 '21 15:06 OliverJAsh

Thanks, unfortunately this is still an issue. We need to update these as well:

  • https://github.com/mock-server/mockserver-node/blob/6a3200b09928aaf86853a8b63cf9346a2dfeda35/downloadJar.js#L28
  • https://github.com/mock-server/mockserver-node/blob/6a3200b09928aaf86853a8b63cf9346a2dfeda35/downloadJar.js#L38

OliverJAsh avatar Jun 25 '22 15:06 OliverJAsh