adoroszlai commented on PR #7514: URL: https://github.com/apache/ozone/pull/7514#issuecomment-2511408878
> how the existing code works with the MetaInfServices - Classes annotated with `@MetaInfServices(<interface>)` are listed in `META-INF/services/<interface>` at compile-time. They are expected to implement `<interface>`. - `ServiceLoader.load(<interface>)` creates an object that, when iterated, gives you an instance of each class. The more implementations of `<interface>` we have, and the more diverse they are (in which other classes they use), the more time it takes to load them. So the speedup is due to not having to load unrelated implementations (those that belong to `ozone debug`, `ozone repair`, etc.). > reduces the startup time of the commands by half I measured the time spent registering subcommands (the part being changed). Time before/after that is likely unchanged. There may be further place for improvement in those parts, will check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
