| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,6 +71,13 @@ This JSON stream format is intended to be used with tools such as | |||
| 71 | 71 | Chrome DevTools. The JSON schema is undocumented and specific to the | |
| 72 | 72 | V8 engine. Therefore, the schema may change from one version of V8 to the next. | |
| 73 | 73 | ||
| 74 | + Creating a heap snapshot requires memory about twice the size of the heap at | ||
| 75 | + the time the snapshot is created. This results in the risk of OOM killers | ||
| 76 | + terminating the process. | ||
| 77 | + | ||
| 78 | + Generating a snapshot is a synchronous operation which blocks the event loop | ||
| 79 | + for a duration depending on the heap size. | ||
| 80 | + | ||
| 74 | 81 | ```js | |
| 75 | 82 | // Print heap snapshot to the console | |
| 76 | 83 | const v8 = require('v8'); | |
@@ -290,6 +297,13 @@ A heap snapshot is specific to a single V8 isolate. When using | |||
| 290 | 297 | [worker threads][], a heap snapshot generated from the main thread will | |
| 291 | 298 | not contain any information about the workers, and vice versa. | |
| 292 | 299 | ||
| 300 | + Creating a heap snapshot requires memory about twice the size of the heap at | ||
| 301 | + the time the snapshot is created. This results in the risk of OOM killers | ||
| 302 | + terminating the process. | ||
| 303 | + | ||
| 304 | + Generating a snapshot is a synchronous operation which blocks the event loop | ||
| 305 | + for a duration depending on the heap size. | ||
| 306 | + | ||
| 293 | 307 | ```js | |
| 294 | 308 | const { writeHeapSnapshot } = require('v8'); | |
| 295 | 309 | const { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments