-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transformer workaround memory leak when processing large models (#3253)
- see this issue report of the leak nodejs/node-addon-api#1140 - the leak appears to be a bug in node[-addon-api]. Tracing the gc shows JS heap size remains stable and old-generation garbage collection sweeps occur in parallel with the JS work, but objects that use `Napi::ObjectWrap` hold on to some memory until the thread yields. See the above issue for more details. - the workaround is to force yield the javascript job in long loops - the transformation service already employs this workaround to handle huge models Co-authored-by: Michael Belousov <[email protected]>
- Loading branch information
1 parent
d698388
commit 6d9dba7
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@itwin/core-transformer/transformer-handle-large-models_2022-02-22-18-07.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@itwin/core-transformer", | ||
"comment": "mitigate memory leak in large model processing", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@itwin/core-transformer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters