0

When turning on JRebel for my JSF project, CPU usage gets too high on each requests & drops down when request has been served. I did looked though the profiler but it was not caused due to my project classes itself. But I could even figure out the culprit looking at the profiling results. Here are the profiling results :

enter image description here

enter image description here

Interestingly the problem disappears when I

  1. either disable JRebel,
  2. or remove a 3rd party URL rewrite library (com.ocpsoft.pretty.faces.*).

But then I created a new fresh netbeans project without disabling either of the above two, & but still the problem is not there, which expectedly should have been.

Any idea what may be causing this ?

Edit:

Seems Prettyfaces (com.ocpsoft.pretty.faces) URL rewrite library is the culprit anyway.. See this snapshot:enter image description here

But why this happens only when Jrebel is on ??

Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
  • Please add -Drebel.log=true -Drebel.log.perf=true to VM arguments, reproduce the workflow and send jrebel.log, written to {user.home}/.jrebel/jrebel.log to JRebel's support. JRebel probably does some excessive scanning in your setup. – Anton Arhipov Feb 14 '14 at 17:29

2 Answers2

2

The problem is in JRebel 5.5.0 prettyfaces plugin, you can either disable it, or use JRebel nightly build (or JRebel 5.5.1+ once available), which contains the fixed version.

http://zeroturnaround.com/software/jrebel/download/early-access/

Joonas Vali
  • 727
  • 6
  • 11
  • oh I didn't even realized there may be a prettyfaces plugin..now trying after disabling that.. – Rajat Gupta Feb 19 '14 at 04:05
  • even after disabling all plugins the CPU load does not reduce.. there is an increased latency to load pages from localhost.. – Rajat Gupta Mar 26 '14 at 16:11
  • Please send the issue to JRebel support. support@zeroturnaround.com . Don't forget to include a performance log. http://zeroturnaround.com/software/jrebel/learn/sending-log/ . Also make sure you are running the latest JRebel 5.5.2 – Joonas Vali Mar 27 '14 at 08:16
1

I also ran into this. This is definitely an issue with JRebel 5.5.0.

I worked around this problem by using JRebel 5.4.2 instead.

chkal
  • 5,598
  • 21
  • 26
  • did you also had the same setup (jsf/prettyfaces) ? What was eating CPU in your case ? – Rajat Gupta Feb 17 '14 at 04:07
  • The PrettyFaces configuration is cached in a field which JRebel seems to clear for some reason. That's why PrettyFaces is rebuilding it's configuration for each request which takes some time due to the annotation scanning. – chkal Feb 17 '14 at 10:54
  • is jrebel doing right by clearing it on each request, instead of doing when there are changed made.. I think the bug is in the jrebel, right ? Strangely this does not happen in the fresh project that I created with same setup. – Rajat Gupta Feb 17 '14 at 11:48
  • It's a bug in JRebel. – chkal Feb 19 '14 at 15:42