3

Recently I started with developing a JBoss SEAM web application (auction site). So far I've come along great, but recently i ran into long loading times ( especially on the resources like javascripts/css files, but also the pages itself are slow ).

Is there a profiler for JBoss SEAM/AS where i can see what classes are in memory , etc?

What could be the reason the loading times are high on the CSS/JS/images files? Due developing reasons I haven't enabled the web-cache filters offered by seam yet. This are my VM arguments


-Drebel.log=true -noverify -javaagent:"C:\Program Files\ZeroTurnaround\JRebel\jrebel.jar" -Drebel.hibernate_plugin=true -Drebel.seam_plugin=true -Drebel.jboss_plugin=true -Drebel.allow_bytecode_proxy=true  -Dprogram.name="JBoss 5.1 Runtime" -Djava.endorsed.dirs="C:\Java\jboss\as5.0\lib\endorsed" -Dproject.home="C:\Java\jboss\as5.0\server\default\deploy\botenveiling.war" -Xms1024m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xverify:none

I did some tweaks (removed some of the default applications): http://www.jaysonjc.com/programming/how-to-configure-jboss-as-production-settings-and-tuning-tips.html

I am using WAR-explode to deploy my files to the server.

Setup:

  • JBoss Application Server 5.1
  • JBoss SEAM 2.2.2CR1
  • JRebel
  • PrimeFaces 1.1

System

  • Intel Core 2 Duo E6550
  • 4 GB of memory
Singleton
  • 3,701
  • 3
  • 24
  • 37
mark_dj
  • 984
  • 11
  • 29

1 Answers1

2

I wrote a blog post where I showed an Interceptor that can measure each method call that your components are using.

This way you can see which methods use long time, and can find bugs in your code. Take a look here and scroll down to the Second Example.

You will get output like this:

  284.94 ms   1   FooBean.getRandomDroplets()
  284.56 ms   1   GahBean.getRandomDroplets()
  201.60 ms   2   SohBean.searchRatedDoodlesWithinHead()
  185.94 ms   1   FroBean.doSearchPopular()
  157.63 ms   1   FroBean.doSearchRecent()
  42.34 ms   1   FooBean.fetchMostRecentYodel()
  41.94 ms   1   GahBean.getMostRecentYodel()
  15.89 ms   1   FooBean.getNoOfYodels()
  15.00 ms   1   GahBean.getNoOfYodels()
  9.14 ms   1   SohBean.mainYodels()
  1.11 ms   2   SohBean.trackHoorayEvent()
  0.32 ms   1   FroBean.reset()
  0.22 ms  43   NohBean.thumbPicture()
  0.03 ms  18   FooBean.getMostRecentYodels()
  0.01 ms   1   NohBean.profilePicture()
  0.01 ms   1   FroBean.setToDefault()
  0.01 ms   1   FroBean.getRecentMarker() 

Second, there is a profiling page on the Seam knowledge-base, but it's not that good really.

Dan Allen also wrote a nice two part post about speeding up your jsf application which is worth a read.

Part 1

Part 2


A Firebug like tool is also a must for javascript/ajax performance tooling

Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
  • That interceptor is nice! Thanks for that :) Nice articles aswell on the more advanced/performance aspects of SEAM. I already installed FireBug and it seemds resources like javascripts, stylesheets, images, etc are taking like 1-2 sec to load (using primefaces causes a lot of load time). A normal page loads in 200-400 ms. Thats quite oke i guess, but still it could be faster :) – mark_dj Dec 02 '10 at 14:58
  • Perhaps there are tweaks of Primefaces you can do. For instance in web.xml in Richfaces we can compress the scripts and css through configuration. I am pretty sure Primefaces has something similar. This might help alot – Shervin Asgari Dec 03 '10 at 08:44