Skip to content

Conversation

@john9x
Copy link
Contributor

@john9x john9x commented Oct 26, 2022

I propose to add cache for mocked types because class generation through ByteBuddy is expensive. In my project 5.0.1 is 2x slower than 4.3. With this patch 5.0.1 slightly slower (or equals I don't measured fine) than 4.3.

@henri-tremblay
Copy link
Contributor

Thanks for the proposal and the benchmark. I'll look deeper into it. ByteBuddy can't cache by itself? I was looking for that.

@henri-tremblay henri-tremblay self-requested a review October 26, 2022 13:50
@henri-tremblay henri-tremblay self-assigned this Oct 26, 2022
@henri-tremblay henri-tremblay added this to the 5.1.0 milestone Oct 26, 2022
@john9x
Copy link
Contributor Author

john9x commented Oct 26, 2022

ByteBuddy just provide TypeCache and developer should himself implement caching by its own needs.

@henri-tremblay
Copy link
Contributor

I will decline this one because it's superseded by #353. But I'm reusing the idea. Thanks a lot for your help!

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.

2 participants