mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-11-03 03:36:26 +08:00
[Chinese-translation]README.chinese.md - add 3.5
This commit is contained in:
@ -265,11 +265,11 @@
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## ![✔] 3.5 Name Your Functions
|
||||
## ![✔] 3.5 命名您的方法
|
||||
|
||||
**TL;DR:** Name all functions, including closures and callbacks. Avoid anonymous functions. This is especially useful when profiling a node app. Naming all functions will allow you to easily understand what you're looking at when checking a memory snapshot.
|
||||
**TL;DR:** 命名所有的方法,包含闭包和回调。避免匿名方法。当剖析一个node应用的时候,这是特别有用的。命名所有的方法将会使您非常容易的理解内存快照中您正在查看的内容。
|
||||
|
||||
**Otherwise:** Debugging production issues using a core dump (memory snapshot) might become challenging as you notice significant memory consumption from anonymous functions.
|
||||
**否则:** 使用一个核心dump(内存快照)调试线上问题,会是一项非常挑战的事项,因为你注意到的严重内存泄漏问题极有可能产生于匿名的方法。
|
||||
|
||||
<br/><br/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user