Skip to content

Improve performance of OPCPackage#getPartsByRelationshipType - #199

Open
MariusVolkhart wants to merge 1 commit into
apache:trunkfrom
MariusVolkhart:mv/getPartsByRelationshipTypePerformance
Open

Improve performance of OPCPackage#getPartsByRelationshipType#199
MariusVolkhart wants to merge 1 commit into
apache:trunkfrom
MariusVolkhart:mv/getPartsByRelationshipTypePerformance

Conversation

@MariusVolkhart

Copy link
Copy Markdown
Contributor

The previous version of this function would first retrieve a filtered set of all the relationships, and then for each of those, iterate through all of the relationships again before finding the part.

Since the relationships returned by getRelationshipsByType() are already trusted, we can retrieve the part directly by formulating the part name from the relationship.

The previous version of this function would first retrieve a filtered set of all the relationships, and then for each of those, iterate through all of the relationships again before finding the part.

Since the relationships returned by getRelationshipsByType() are already trusted, we can retrieve the part directly by formulating the part name from the relationship.
@MariusVolkhart
MariusVolkhart force-pushed the mv/getPartsByRelationshipTypePerformance branch from d7a8f16 to f1ebcc5 Compare December 18, 2020 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant