Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I've timed it, it's very slow because it uses reflection to generate the model. The annotation processor doesn't let you avoid this step unfortunately. Native images do.


But that step only has to run as part of building it. It doesn’t have to run at every invocation. How did you try to run it?

From the documentation:

> The picocli-codegen module includes an annotation processor that can build a model from the picocli annotations at compile time rather than at runtime.

> Enabling this annotation processor in your project is optional, but strongly recommended. Use this if you’re interested in

I think you didn’t use it.


I use it but you have misunderstood what it does. It builds a model in memory and then you can use that to do other tasks at build time. It doesn't persist the model in a form that the app itself can use to start up faster.

See here:

https://github.com/remkop/picocli/issues/539

Although looking over that issue, it looks like maybe reflection was never proven to be the source of the slowdowns.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: