node.js - What could cause Node's performance to suddenly halve? -


my application in node.js has performance tests run several times. partway through execution speed drops half original value:

run 1: 6604 ms run 2: 6404 ms run 3: 6386 ms run 4: 6392 ms run 5: 12755 ms run 6: 12977 ms run 7: 13124 ms 

insignificant changes code can push cliff forwards or backwards, can't figure out trigger is.

  • node v8.2.1 on os x.
  • not recreatable when run chrome.
  • total memory usage constant 60mb, adding forced gc between runs has no effect.
  • the task purely algorithmic (computing fibonacci sequences in convoluted way), there no disk or network access.

does recognize fingerprint of issue?

i apologize being unable provide minimal example, issue started surface once application crossed 4,000 line mark. , issue disappears once application trimmed below 4,000 lines.

edit: same test when run in debian shows more dramatic cliff. performance drops sharply 8424 ms 45212 ms.

i found answer. issue version of v8 used current version of node. of v9.0.0-nightly20170607eef94a8bf8/ 07-jun-2017 20:00 issue disappears due new version of v8 having landed.

to summarize: it's unknown bug in node.js, 1 that's fixed in nightlies , released version 9.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -