Skip to content

Add cache for mocked types. - #334

Closed
john9x wants to merge 1 commit into
easymock:masterfrom
john9x:types-caching
Closed

john9x wants to merge 1 commit into
easymock:masterfrom
john9x:types-caching

Conversation

@john9x

@john9x john9x commented Oct 26, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

john9x commented Oct 26, 2022

Copy link
Copy Markdown
Contributor Author

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

@henri-tremblay

Copy link
Copy Markdown
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