osx - Node.js require becomes extremely slow after OS X has been running for a while -


when reboot mac, starting node.js apps nice , fast. later, after mac has been on few hours, gets slow.

i've used process.hrtime() time various things, , seems it's require calls take time, ie loading dependencies. once loaded, apps run reasonably fast.

the difference extreme: after i've rebooted, app may take 300ms through require calls, takes 30 seconds once it's been on few hours.

what causing this?

since how fast executing require related disk loading performance. suppose it's highly possible hdd/ssd or whatever project belongs causing that. it's working fine right after rebooted maybe background software(such virus scan or auto downloader) making io blocking

you'd better start checking cpu/ram/hdd status while issue occurring , see happens if move project usb flash drive or external hdd


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -