4

In wildfly 8.x or even in jboss 7.x, disabling weld results in a really slow performance in JSF.

I discussed my performance issue before in this question, and I managed to solve it by enabling weld extension in the standalone.xml

Here is my JSF sample GITHUB (Please go ahead and try it on wildfly)

Could someone please explain to me why does weld affect the performance?

UPDATE:

again here are my results just to show that I am not making this up

WELD ENABLED

WELD IS ENABLED

WELD DISABLED

WELD IS DISABLED

See the time difference !!!!

Thanks in Advance,

Tefa

Community
  • 1
  • 1
TeFa
  • 954
  • 3
  • 13
  • 35
  • 1
    This makes no sense at all, disabling weld subsystem for apps that don't use CDI should improve performance in any case not degrade it. I recommend you trying with profiler to see what is impacting performance the most. – Tomaz Cerar Jan 07 '15 at 14:06
  • 1
    Exactly, it doesn't make any sense for me either. Could you please download my sample and try it out on wildfly with weld enabled/disabled and tell if you see any performance issues in the ajax response ? ... Thanks for your time – TeFa Jan 07 '15 at 14:32
  • I opened an issue for it on wildfly issue tracker. https://issues.jboss.org/browse/WFLY-4237 – TeFa Jan 12 '15 at 11:57
  • Did you try this app in any other application server? – kolossus Jan 13 '15 at 05:04
  • Yes, I tried to deploy my sample webapp to Apache Tomcat without embedding weld and I had no performance issues. It only occurs with wildfly/jboss with weld disabled. – TeFa Jan 13 '15 at 08:08
  • I would really appreciate if someone can confirm this performance issue on wildfly. – TeFa Jan 13 '15 at 08:11

1 Answers1

1

It looks like JSF annotations like @ManagedBean are starting to get replaced in favor of CDI equivelents as discussed in this quesiton:

Backing beans (@ManagedBean) or CDI Beans (@Named)?

I think it is best to migrate your code to CDI, since WildFly is a Java 7 EE container and it is highly probable that the guys at WildFly decided to optimise their container for newer technos like CDI.

Also check the answer of BalusC on the same post, he explains very well the issue.

Community
  • 1
  • 1
sashok_bg
  • 1,739
  • 1
  • 15
  • 27
  • While conceptually true, this post does actually not concretely answer the performance problem stated in the question. – BalusC May 08 '15 at 09:55