-
Notifications
You must be signed in to change notification settings - Fork 230
Heap performance #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Heap performance #56
Conversation
| dataOffset: element.dataOffset, | ||
| length : element.length | ||
| }; | ||
| result[tag] = dicomParser.explicitElementToString(dataSet, element); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will create entries with undefined values in result, which could break client code enumerating on said result, this if rewrite is an API change.
| element = null; | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clean-up is not needed as the whole closure is disposed of with the return statement that follows.
| } | ||
| } | ||
|
|
||
| delete element.tag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete the tag property of the last parsed element?
| element = null; | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| delete element.tag; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as in parseDicomDataSetImplicit
Several tweaks to speed up freeing of memory in heap and overall performance. From my testing I got about a 4% improvement.