bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Andraschko <andraschko.tho...@gmail.com>
Subject Re: TomEE8 / OWB2.x / BVal2 - slow startup
Date Thu, 11 Oct 2018 15:23:15 GMT
Do you think it's better to configure the filter only in TomEE?
In OWB we also skip some known jars and configured default filters directly
in OWB, probably it makes sense to ignore some known libs also directly in
BVal.

There is the source of the filter in TomEE:
https://github.com/apache/tomee/blob/8547f730b7c9fc085534a8f5d1f68340154d2cfe/container/openejb-core/src/main/java/org/apache/openejb/bval/BValCdiFilter.java

probably it already filters many stuff but not deltaspike, myfaces and
openejb.

Am Do., 11. Okt. 2018 um 17:18 Uhr schrieb Romain Manni-Bucau <
rmannibucau@gmail.com>:

> Hi Thomas,
>
> you are right
>
> this is already overrided in tomee to inherit from the tomee exclusions
> which were not updated on tomee 8 AFAIK
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le jeu. 11 oct. 2018 à 17:17, Thomas Andraschko <
> andraschko.thomas@gmail.com>
> a écrit :
>
> > Hi,
> >
> > today i did a first try on TomEE8 and i really wondered about the slow
> > startup, with even 1 application:
> >
> > TomEE8:
> > OpenWebBeans Container has started, it took 9356 ms
> >
> > TomEE7:
> > OpenWebBeans Container has started, it took 4287 ms
> >
> > i found out that ~3 seconds are taken by
> > BValExtension#processAnnotatedType, but i also know that BVal 2 probably
> > requires to build metadata for each bean, so a overhead is expected.
> >
> > A good, first, performance boost would be to enhance the
> > BValExtension#DEFAULT_ANNOTATED_TYPE_FILTER:
> >
> >     private static final AnnotatedTypeFilter
> DEFAULT_ANNOTATED_TYPE_FILTER
> > =
> >         (AnnotatedType<?> annotatedType) -> {
> >             String className = annotatedType.getJavaClass().getName();
> >             return !className.startsWith("org.apache.bval.")
> >                     && !className.startsWith("org.apache.deltaspike.")
> >                     && !className.startsWith("org.apache.openejb.")
> >                     && !className.startsWith("org.apache.myfaces.");
> >     };
> >
> > This reduces the startup time by 2 seconds to:
> > OpenWebBeans Container has started, it took 7750 ms.
> >
> > WDYT?
> >
> > Best regards,
> > Thomas
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message