Open yrosen-infinidat opened 1 month ago
What JDK do you use for Jersey 2.40? The jersey-wadl-doclet
module used JDK classes, which are no longer available in a new JDK. So for JDK 12+, a different set of JDK classes are used, which might cause low speed.
I'm using JDK 8. My main question here is just whether or not it would be problematic to keep the old doclet while still using Jersey 2.40.
Edit: Tested now on JDK 17 as well, still the same.
@jansupol Do you know if there's any problem with keeping the versions mismatched?
@yrosen-infinidat as per my investigation the main difference between 2.x and 1.x WADL generation approach is usage of JAXB vs Xerces (+JAXB). The newer Jersey generates a full DOM model using JAXB while the old one uses a combination of JAXB + XML serializer (from Xerces). While testing on small WADLs it gives a pretty similar generation speed. However, I presume, that when WADL is quite big, the newer Jersey could delay WADL's generation.
Regarding your question about mismatched versions - com.sun.jersey.contribs:wadl-resourcedoc-doclet:1.19.4
can be safely used as a WADL generator. It does not affect other modules' functionality.
We've upgraded our Jersey from version 1.19.4 to version 2.40, and ever since then, our Javadoc task (executed by Ant) takes much longer - about 4 minutes, in contrast to the instant execution it had in 1.19.4.
This is the old task:
And this is the new one:
This is the log produced by the execution of the task in the old version, everything here shows up instantly. (There are some Javadoc warnings which I'm not showing because they reveal information about the source code, but they are the same in both the old and new version anyways)
However, in the new version, it gets to this point:
Then it's stuck here for about 4 minutes, and afterwards proceeds normally with:
Is this a known issue/behavior? Or am I missing something in the configuration? Is there any problem with keeping old Jersey just for this purpose while having everything else run on new Jersey? Or will there be some version mismatches?