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 cache for mocked types. #334

Closed
wants to merge 1 commit into from
Closed

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-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.

None yet

2 participants