开发者

Profiling/debug JBoss AS/Seam application

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 resourc开发者_如何学编程es 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜