NodeJs更新后的高CPU使用量

时间:2018-03-09 12:25:51

标签: node.js

我正在使用socket.io和nodejs。我将它们更新到最新版本(Nodejs - > v8和socket.io - > v2)

现在节点进程正在使用%100 cpu和socket.io响应太慢。我该如何解决这个问题?我的代码没有任何改变。

个人资料结果:

[Top down (heavy) profile]:
  Note: callees occupying less than 0.1% are not shown.

  inclusive      self           name
  ticks   total  ticks   total
  37804   91.8%      0    0.0%  v8::internal::Runtime_ArrayIndexOf(int, v8::inte                                                                                                                                                             rnal::Object**, v8::internal::Isolate*)
  35176   85.4%  35176   85.4%    v8::internal::HashTable<v8::internal::SeededNu                                                                                                                                                             mberDictionary, v8::internal::SeededNumberDictionaryShape>::FindEntry(v8::intern                                                                                                                                                             al::Isolate*, unsigned int)
   2628    6.4%   2628    6.4%    v8::internal::(anonymous namespace)::ElementsA                                                                                                                                                             ccessorBase<v8::internal::(anonymous namespace)::DictionaryElementsAccessor, v8:                                                                                                                                                             :internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind                                                                                                                                                             )6> >::IndexOfValue(v8::internal::Isolate*, v8::internal::Handle<v8::internal::J                                                                                                                                                             SObject>, v8::internal::Handle<v8::internal::Object>, unsigned int, unsigned int                                                                                                                                                             )

    462    1.1%      3    0.0%  v8::internal::Builtin_HandleApiCall(int, v8::int                                                                                                                                                             ernal::Object**, v8::internal::Isolate*)
    369    0.9%    369    0.9%    node::(anonymous namespace)::ContextifyScript:                                                                                                                                                             :New(v8::FunctionCallbackInfo<v8::Value> const&)

    143    0.3%      0    0.0%  v8::internal::Runtime_CompileLazy(int, v8::inter                                                                                                                                                             nal::Object**, v8::internal::Isolate*)

    112    0.3%    112    0.3%  syscall

我删除了node_modules并重新安装但问题仍未解决。

有什么问题?

0 个答案:

没有答案