Skip to content
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

Improve performance of OPCPackage#getPartsByRelationshipType #199

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

MariusVolkhart
Copy link
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
1 participant