JSF-Primefaces App:Memory not releasing & Performance impact

UI Components for JSF
nirajgala190
Posts: 30
Joined: 04 Jul 2012, 17:37

05 Aug 2015, 12:50

JSF-Primefaces App: Memory not releasing & Performance impact issue

I have created Web application using JSF & Primefaces. It is consuming more memory & also not releasing memory.
Also, there is a Performance impact on the application.
Web Server: Apache Tomcat 7.0.32

Please guide me in resolving the issue.
PrimeFaces 6.0 | Apache Tomcat 7.0.53, 7.0.x | Mojarra 2.2.8
Windows 7, Ubuntu | Firefox 50

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

05 Aug 2015, 12:55

use a profiler ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

10 Aug 2015, 16:12

Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

10 Aug 2015, 18:11

@Howard: nice summary, maybe BalusC should create a tab for this on http://jsf.zeef.com.

But the referecence to the 'old' Mojarra vs MyFaces (the one with the hockeystick curve) should not be in there I think.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

10 Aug 2015, 21:22

kukeltje wrote:But the referecence to the 'old' Mojarra vs MyFaces (the one with the hockeystick curve) should not be in there I think.
I think/believe there is still a big difference or did they more performance improvements? I'm only aware about the issue with a big view with many components.
But maybe someone should run the benchmark again :?:
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Aug 2015, 09:25

Avoid component binding to a session, view scoped bean.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

11 Aug 2015, 11:07

@Oleg: they did. The link above the one with the hockeystick curve: https://blog.oio.de/2013/05/16/jsf-perf ... t-release/

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

11 Aug 2015, 11:22

kukeltje wrote:@Oleg: they did. The link above the one with the hockeystick curve: https://blog.oio.de/2013/05/16/jsf-perf ... t-release/
Thomas, not Oleg :D
Ahh i see, that would be the better link of course!
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

nirajgala190
Posts: 30
Joined: 04 Jul 2012, 17:37

13 Aug 2015, 13:44

Thanks for all posts.
I have read them and shared consolidated issues list below:

1. I am using Mojarra 2.2.6. Would you recommend migrating to MyFaces for better performance.

2. I am using ViewScoped Beans for my page.
I am not binding components to ViewScope Beans, instead I am mapping Component Value to beans objects.

I have noticed that while navigating from one page to other page, Beans objects are not removed from SessionScope.
(ViewScope objects are stored in SessionScope)
Would this be causing memory leaks.? Is there any alternative to this or any code that would remove Beans objects from SessionScope on page navigation.

Please share your views..!
PrimeFaces 6.0 | Apache Tomcat 7.0.53, 7.0.x | Mojarra 2.2.8
Windows 7, Ubuntu | Firefox 50

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

13 Aug 2015, 14:07

1) yep...
3) ViewScoped beans will be released but not eagerly. I would reduce the max views in session (com.sun.faces.numberOfViewsInSession / org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION).
If you have real memory leaks, they will of course never be released.

We can't help if you have real memory leaks. This can only be checked via a profiler.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests