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

Don't generate BeanDefinitionReference and BeanIntrospectionReference #10490

Merged
merged 10 commits into from
Feb 21, 2024
Merged

Conversation

dstepanov
Copy link
Contributor

@dstepanov dstepanov commented Feb 13, 2024

I don't see any benefit to generating BeanDefinitionReference and BeanIntrospectionReference, but there are some benefits now:

  • Generating fewer classes should speed up the compilation
  • Probably less JVM overhead
  • BDs are now initialized at the build time for the native image
  • Executable is smaller :test-suite-http-server-tck-netty:nativeTestCompile 77->73.7 MB

@dstepanov dstepanov added the type: improvement A minor improvement to an existing feature label Feb 13, 2024
@dstepanov dstepanov marked this pull request as draft February 13, 2024 14:31
@dstepanov
Copy link
Contributor Author

Native size.
Before:
Screenshot 2024-02-14 at 15 19 02
After:
Screenshot 2024-02-14 at 15 18 53
Somehow Serde size got smaller even, so the changes are not projected there

@dstepanov dstepanov changed the title Don't generate BeanDefinitionReference Don't generate BeanDefinitionReference and BeanIntrospectionReference Feb 15, 2024
@dstepanov dstepanov marked this pull request as ready for review February 19, 2024 16:15
@dstepanov
Copy link
Contributor Author

dstepanov commented Feb 19, 2024

I verified that it works with Micronaut Serialization, and I ran some Micronaut Data tests.

Copy link
Member

@yawkat yawkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a good change but a bit risky

@graemerocher
Copy link
Contributor

What is the binary compatibility story here? Will it break binary compatibility and require rebuilds of all modules?

@dstepanov
Copy link
Contributor Author

It is binary-compatible with the previously compiled references and bean definitions.

@dstepanov
Copy link
Contributor Author

Added abstract classes

Copy link

@dstepanov dstepanov merged commit 8c12ad3 into 4.4.x Feb 21, 2024
15 checks passed
@dstepanov dstepanov deleted the bd branch February 21, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants