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

Add minor perf improvements #1318

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Add minor perf improvements #1318

merged 1 commit into from
Jul 29, 2022

Conversation

mtdowling
Copy link
Member

I was doing some profiling and saw lots of string
computations caused by recomputing equals and hashcode.
This adds a cache for the hashCode of Shape and takes
advantage of the caching used for Trait and Shape when
performing equals checks.

I also don't think the cost of computing a canonical
class name is needed compared to using Class#getName
for Model's blackboard data structure.

Finally, I saw we were creating a Stream and not using it.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I was doing some profiling and saw lots of string
computations caused by recomputing equals and hashcode.
This adds a cache for the hashCode of Shape and takes
advantage of the caching used for Trait and Shape when
performing equals checks.

I also don't think the cost of computing a canonical
class name is needed compared to using Class#getName
for Model's blackboard data structure.

Finally, I saw we were creating a Stream and not using it.
@mtdowling mtdowling requested a review from a team as a code owner July 28, 2022 06:06
@mtdowling mtdowling merged commit 664d5f2 into idl-2.0 Jul 29, 2022
@mtdowling mtdowling deleted the idl-2-perf branch July 29, 2022 23:12
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