问题
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 :
Interestingly the problem disappears when I
- either disable JRebel,
- 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:
But why this happens only when Jrebel is on ??
回答1:
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/
回答2:
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.
来源:https://stackoverflow.com/questions/21782940/high-cpu-usage-when-jrebel-is-on