<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=RU link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Jay,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>That&#8217;s good news
for us that one lock is gone. Please keep me posted about further findings.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Best regards,</span></font><font
color=navy><span lang=EN-US style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>&nbsp; Nick Belaevski</span></font><span
lang=EN-US><o:p></o:p></span></p>

</div>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Jay Balunas [mailto:tech4j@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, October 01, 2008
4:19 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Jay Balunas<br>
<b><span style='font-weight:bold'>Cc:</span></b> Nick Belaevski; Max Rydahl
Andersen; richfaces-exadel@redhat.com; seam-dev@lists.jboss.org Development
List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Richfaces-exadel]
Fwd: [seam-dev] Some profiling of blockingthreads</span></font><span
lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I was able to update and build with RichFaces 3.3.0-SNAPSHOT and saw
your changes.<br>
<br>
The good news is that I no longer see any blocking threads in the
&quot;org.ajax4jsf.application.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>AjaxViewHandler&quot; - none at all which is great.<br>
<br>
The bad news is that the performance has not increased in any meaningful or
repeatable way.&nbsp; <br>
<br>
During my profiling I noticed a definite increase in the blocked threads
performing JNDI lookups.&nbsp; My theory is that the AjaxViewHandler was acting
as a gate and effectively slowing down concurrent requests into Seam
proper.&nbsp; These threads now fly straight through and into Seam
processing.&nbsp; They the end up blocked with the other threads performing the
lookups.<br>
<br>
I will continue to look at the lookup issues, and let you all know what I find.<br>
<br>
-Jay<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Tue, Sep 30, 2008 at 2:05 PM, Jay Balunas &lt;<a
href="mailto:jbalunas@redhat.com">jbalunas@redhat.com</a>&gt; wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Excellent &nbsp;- I will build from sources and test the changes.<br>
<br>
I'll post the findings up on seam-dev.<br>
<font color="#888888"><span style='color:#888888'><br>
-Jay</span></font><o:p></o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>----- &quot;Nick Belaevski&quot; &lt;<a
href="mailto:nbelaevski@exadel.com">nbelaevski@exadel.com</a>&gt; wrote:<br>
<br>
&gt; All,<br>
&gt;<br>
&gt; I've created JIRA issue for this optimization:<br>
&gt; <a href="https://jira.jboss.org/jira/browse/RF-4554" target="_blank">https://jira.jboss.org/jira/browse/RF-4554</a>
and have just fixed it.<br>
&gt;<br>
&gt; As from now ViewHandlerWrapper#fillChain method is not synchronized<br>
&gt; anymore.<br>
&gt;<br>
&gt; Best regards,<br>
&gt; &nbsp; Nick Belaevski<br>
&gt;<br>
&gt; &gt; -----Original Message-----<br>
&gt; &gt; From: <a href="mailto:richfaces-exadel-bounces@redhat.com">richfaces-exadel-bounces@redhat.com</a>
[mailto:<a href="mailto:richfaces-exadel-">richfaces-exadel-</a><br>
&gt; &gt; <a href="mailto:bounces@redhat.com">bounces@redhat.com</a>] On Behalf
Of Max Rydahl Andersen<br>
&gt; &gt; Sent: Tuesday, September 30, 2008 10:32 AM<br>
&gt; &gt; To: Jay Balunas; <a href="mailto:richfaces-exadel@redhat.com">richfaces-exadel@redhat.com</a><br>
&gt; &gt; Subject: Re: [Richfaces-exadel] Fwd: [seam-dev] Some profiling of<br>
&gt; &gt; blockingthreads<br>
&gt; &gt;<br>
&gt; &gt; Sergey/Nik ? Any news on this one ?<br>
&gt; &gt;<br>
&gt; &gt; /max<br>
&gt; &gt;<br>
&gt; &gt; &gt; Hi Guys,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I have been doing some performance testing on seam applications<br>
&gt; and have<br>
&gt; &gt; &gt; been able to post some of the results. &nbsp;One of the areas
that I<br>
&gt; have<br>
&gt; &gt; &gt; investigated so far was blocking/waiting threads.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; In my example I am running 25 concurrent users and hitting the<br>
&gt; seam wiki<br>
&gt; &gt; &gt; example. &nbsp;I am seeing blocked threads waiting on<br>
&gt; &gt; &gt; &quot;org.ajax4jsf.application.AjaxViewHandler&quot;.<br>
&gt; &gt; &gt; I have investigated it a bit (see below), and have included some<br>
&gt; of the<br>
&gt; &gt; &gt; discussions on the seam-dev list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I would like to get an opinion of the synchronized fillChain<br>
&gt; method, and<br>
&gt; &gt; &gt; see<br>
&gt; &gt; &gt; if there is another way to handle this.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thoughts?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks,<br>
&gt; &gt; &gt; Jay<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ---------- Forwarded message ----------<br>
&gt; &gt; &gt; From: Emmanuel Bernard &lt;<a
href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;<br>
&gt; &gt; &gt; Date: Thu, Sep 25, 2008 at 10:01 AM<br>
&gt; &gt; &gt; Subject: Re: [seam-dev] Some profiling of blocking threads<br>
&gt; &gt; &gt; To: Jay Balunas &lt;<a href="mailto:tech4j@gmail.com">tech4j@gmail.com</a>&gt;<br>
&gt; &gt; &gt; Cc: Pete Muir &lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;,
&quot;<a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&quot;
&lt;<br>
&gt; &gt; &gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>&gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On &nbsp;Sep 25, 2008, at 09:17, Jay Balunas wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; org.ajax4jsf.application.AjaxViewHandler<br>
&gt; &gt; &gt;&gt; --------------------------------------------<br>
&gt; &gt; &gt;&gt; &nbsp;- This was not a large % of the blocked threads but
caught my<br>
&gt; eye as a<br>
&gt; &gt; &gt;&gt; potential trouble spot because it seemed directly related to<br>
&gt; ajax<br>
&gt; &gt; calls.<br>
&gt; &gt; &gt;&gt; &nbsp;- This was easier to track down and the root cause is
in the<br>
&gt; &gt; &gt;&gt; org.ajax4jsf.application.ViewHandlerWrapper class.<br>
&gt; &gt; &gt;&gt; &nbsp;- see<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; <a
href="http://anonsvn.jboss.org/repos/richfaces/trunk/framework/api/src/main/java"
target="_blank">http://anonsvn.jboss.org/repos/richfaces/trunk/framework/api/src/main/java</a><br>
&gt; &gt; /org/ajax4jsf/application/ViewHandlerWrapper.java<br>
&gt; &gt; &gt;&gt; &nbsp;- The problem is all the calls to
&quot;fillChain&quot; which is a<br>
&gt; synchronized<br>
&gt; &gt; &gt;&gt; method in the class.<br>
&gt; &gt; &gt;&gt; &nbsp;- We need to find out how often the
&quot;_initialized&quot; field is<br>
&gt; false - is<br>
&gt; &gt; &gt;&gt; this once a request, once for each component, etc...<br>
&gt; &gt; &gt;&gt; &nbsp;- it appears to be called many times - I will look
further into<br>
&gt; this.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; I will raise this the richfaces dev guys, and see what can be<br>
&gt; done.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Using the double check lock pattern with a volatile should make<br>
&gt; things<br>
&gt; &gt; &gt; better. It has to be done right though :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; /max<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Richfaces-exadel mailing list<br>
&gt; &gt; <a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a><br>
&gt; &gt; <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel"
target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Richfaces-exadel mailing list<br>
&gt; <a href="mailto:Richfaces-exadel@redhat.com">Richfaces-exadel@redhat.com</a><br>
&gt; <a href="https://www.redhat.com/mailman/listinfo/richfaces-exadel"
target="_blank">https://www.redhat.com/mailman/listinfo/richfaces-exadel</a><o:p></o:p></span></font></p>

</div>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
blog: <a href="http://in.relation.to/Bloggers/Jay">http://in.relation.to/Bloggers/Jay</a><o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>