Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mika Koivisto
Performance problems
December 12, 2006 3:18 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

There seems to be a significant performance hit for using portlets in external war compared to ones built in extension environment. I tried with different app servers and database compinations and still there is significant difference in response times. Say Products page (the on on this site) is rendered in 8ms for a single user and a page with only JSP portlet or any hello world type of portlet it takes 256ms to render the page. Where is this difference in response time coming from?

The performance seems to be really good on all the built in portlets the problem is only with JSR-168 portlets in standalone .war.

BTW. Great work on getting finally 4.2 released. I've been using it from trunk for some time now.
Brian Chan
RE: Performance problems
December 12, 2006 5:25 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

That's because we're doing a redirect to another servlet context whereas the ext ones are in the same war as the portal and so will always be faster. It's really up to the servlet container to speed that piece up.

Thanks Mika.
Mika Koivisto
RE: Performance problems
December 12, 2006 10:36 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

Do you have any suggestions which servlet container does this fastest?
Mika Koivisto
RE: Performance problems
December 13, 2006 1:15 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

I did some more testing and this about 100ms overhead comes up in JSPPortlet built inside extension environement thus there is no cross-context dispatching. When I add layout-cacheable true to liferay-portlet.xml the portlet becomes as fast as Journal portlet. How can you control the cache time when using that setting? expiration-time in portlet.xml does not seem to have any affect on it.
Brian Chan
RE: Performance problems
December 13, 2006 3:04 PM
Answer

Brian Chan

LIFERAY STAFF

Rank: Liferay Master

Posts: 751

Join Date: August 4, 2004

Recent Posts

Ah.. then it has nothing to do with the cross context stuff with servlets. In general, Tomcat is the fastest from my tests.

Setting layout cacheable to true means the layout can be cached when all the portlets on that page are layout cacheable.

For example, our front page, has about 5-8 portlets that are all journal content. Without caching the layout, it takes about 2 seconds to load because it's processing CMS content from 5-8 different portlets (doing db stuff, portlet includes, etc). Then after the first hit, it takes about .25 seconds because it works like it's static html and gives very fast performance for pure content pages.