Skip to content

Conversation

jkrot
Copy link

@jkrot jkrot commented Sep 16, 2016

Several tweaks to speed up freeing of memory in heap and overall performance. From my testing I got about a 4% improvement.

dataOffset: element.dataOffset,
length : element.length
};
result[tag] = dicomParser.explicitElementToString(dataSet, element);

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.

Comment on lines +79 to 80
element = null;
return;

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;

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?

Comment on lines +40 to +46
element = null;
return;
}
}

delete element.tag;

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants