Eclipse APT slows down compilation

I am currently writing an Eclipse APT to check if my annotations are consistent.

But it seems that turning on APT slows down the compilation process. Even saving a tiny, non-class bound class takes a few seconds and eats a lot of memory.

I think the reason is that the APT framework checks the complete tree of objects (large project), although I only need one class. Just guessing at that though.

Is there a way to improve performance other than disabling APT?

Edit: The first thing I found out is that APT processing is done in stages, and I most likely only need one of them

    if (Phase.RECONCILE != Phase.valueOf(env.getOptions().get("phase"))) {
        return;
    }
+3
source share
1 answer

This presentation (zip-loading the PPT presentation) from the java-apt team addresses some of the issues related to improving performance.

+4
source

Source: https://habr.com/ru/post/1721303/


All Articles