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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -