-
1. Re: Server Performance Problem with 3.1.3 (delays in loading
sergeysmirnov Jan 3, 2008 3:42 PM (in response to mmichalek)Does JBoss writes something in log during this delay?
-
2. Re: Server Performance Problem with 3.1.3 (delays in loading
mmichalek Jan 3, 2008 5:55 PM (in response to mmichalek)Thanks for the response. I don't see any logging activity during the delay (and my CPU is pretty much idle). I turned up logging for Seam, Richfaces and Facelets. Here is a section from my log, let me know if anymore of this would be helpful, or if there's any other info I can get.
...
17:45:48,373 DEBUG org.jboss.seam.core.Events Processing event:org.jboss.seam.postDestroyContext.EVENT
17:45:48,373 DEBUG org.jboss.seam.contexts.FacesLifecycle <<< End JSF request
17:45:48,373 DEBUG org.ajax4jsf.webapp.BaseFilter Finished request processing total time 508ms for uri: /xcenter/a4j_3_2_0-SNAPSHOTorg/richfaces/skin.xcss/DATB/eAGLZKr5DAADWQHL
<long-delay!>
17:46:09,297 DEBUG org.ajax4jsf.webapp.BaseFilter Filter start request processing at 1/3/08 5:46 PM for uri: /xcenter/a4j_3_2_0-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript
17:46:09,297 DEBUG org.ajax4jsf.resource.InternetResourceBase Set response http headers for Resource with key [org.ajax4jsf.javascript.AjaxScript]
17:46:09,297 DEBUG org.ajax4jsf.resource.InternetResourceBase Send content data for Resource with key [org.ajax4jsf.javascript.AjaxScript]
17:46:09,313 DEBUG org.ajax4jsf.resource.ScriptRenderer Send 44192 bytes to client for JavaScript resource org.ajax4jsf.javascript.AjaxScript
... -
3. Re: Server Performance Problem with 3.1.3 (delays in loading
sergeysmirnov Jan 3, 2008 6:15 PM (in response to mmichalek)do you use the FireBug? If so, try to turn it off.
-
4. Re: Server Performance Problem with 3.1.3 (delays in loading
mmichalek Jan 3, 2008 7:46 PM (in response to mmichalek)Unfortunately the delay still occurs with Firebug disabled. This also happens with IE 7.
I wonder if this post is related at all?
http://jboss.com/index.html?module=bb&op=viewtopic&t=126420
It looks like we're using the same JSF version. I'll trying changing that and see if it makes any difference. -
5. Re: Server Performance Problem with 3.1.3 (delays in loading
sergeysmirnov Jan 3, 2008 8:10 PM (in response to mmichalek)I did not see any relation with that post yet.
According to the log, the server spent 508ms for processing css file before it returned back to the browser. Then, the browser did ask nothing during the 21 sec. What it spent this time for? This is a question. If it were javascript, we can guess that some javascript code works slowly. However, it is about css, not js.
BWT, do you experience with the same delay browsing http://livedemo.exadel.com/richfaces-demo/welcome.jsf. It also sends the united css. -
6. Re: Server Performance Problem with 3.1.3 (delays in loading
pmaho6 Jan 4, 2008 5:36 AM (in response to mmichalek)I have experienced the same problem with 3.1.3 and have had to go back to a snapshot from 12th November. It is always the CSS which is reported as taking 20+seconds to process by Firebug, although the request itself is completed within milliseconds.
Peter -
7. Re: Server Performance Problem with 3.1.3 (delays in loading
sergeysmirnov Jan 4, 2008 1:29 PM (in response to mmichalek)do you have another computer around with FireFox ?
-
8. Re: Server Performance Problem with 3.1.3 (delays in loading
cdollar393 Jan 4, 2008 2:08 PM (in response to mmichalek)I saw the same behavior after switching to 3.1.3 - Adding this to my web.xml fixed it for me:
<context-param> <param-name>org.richfaces.LoadScriptStrategy</param-name> <param-value>ALL</param-value> </context-param> <context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>ALL</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name> <param-value>false</param-value> </context-param>
Chris -
9. Re: Server Performance Problem with 3.1.3 (delays in loading
mmichalek Jan 6, 2008 11:02 PM (in response to mmichalek)Setting the LoadStyleStrategy and LoadScriptStrategy params in web.xml did not help the situation for me.
However, I found that I had this setting in Seam's components.xml:<web:ajax4jsf-filter enable-cache="false" />
Removing that setting resolved the long delay.
Now, with the enable-cache setting removed, if I add:<context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>DEFAULT</param-value> </context-param>
... things still work ok.
But if I change this param to:<context-param> <param-name>org.richfaces.LoadStyleStrategy</param-name> <param-value>ALL</param-value> </context-param>
...then, no RichFaces styles load (the pages look the same as with the NONE setting for this param...)
So if I ommit the LoadStyleStrategy param or set it to DEFAULT, things are working ok after removing <web:ajax4jsf-filter enable-cache="false" /> from components.xml. -
10. Re: Server Performance Problem with 3.1.3 (delays in loading
pmaho6 Jan 7, 2008 4:03 AM (in response to mmichalek)I have tried the application using another computer with Firefox, with exactly the same results.
The major difference between the CSS in the different versions is that 3.1.3GA compresses the CSS, despite having org.ajax4jsf.COMPRESS_SCRIPT set to false. Is there another config setting for CSS compression? This seems like the most likely cause (although linking to a static copy of the compressed CSS from the snapshot does not itself cause any slowness).
Peter -
11. Re: Server Performance Problem with 3.1.3 (delays in loading
pmaho6 Jan 7, 2008 11:29 AM (in response to mmichalek)Ok, the compressed CSS is not the cause. For reference, CSS compression can be switched off using the org.ajax4jsf.COMPRESS_STYLE context parameter.
Tracing the request further, I can see that the request completes within a few milliseconds. However, the connection is then kept open for 20 seconds due to keepalive. (inputBuffer.parseRequestLine(); in Tomcat's Http11Processor generates a SocketTimeoutException after 20 seconds). For some reason the browser is not recognising when the request has completed.
I have noticed that the content length HTTP header is twice the actual size of response. This could be responsible, as the browser would wait for the other half of the response, which doesn't exist...
Peter -
12. Re: Server Performance Problem with 3.1.3 (delays in loading
alexsmirnov Jan 7, 2008 12:01 PM (in response to mmichalek)RichFaces library does not contain any code to compress CSS. Also, there is no content length response header for a generated CSS file ( we set Transfer-Encoding: chunked instead ).
Are you have any Script/CSS compressing filter in the application ? -
13. Re: Server Performance Problem with 3.1.3 (delays in loading
pmaho6 Jan 7, 2008 12:37 PM (in response to mmichalek)So what is framework/impl/src/main/java/orj/ajax4jsf/css/CssCompressor.java then?
Without specifying org.ajax4jsf.COMPRESS_SCRIPT as false, the request:
GET /webmail/faces/a4j_3_1_3.GAorg/richfaces/renderkit/html/css/dragIndicator.xcss/DATB/eAGLZKr5DAADWQHL HTTP/1.1
Returns:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Last-Modified: Mon, 07 Jan 2008 17:18:23 GMT
Cache-control: max-age=0, no-store, no-cache
Pragma: no-cache
Expires: 0
Content-Type: text/css;charset=ISO-8859-1
Content-Length: 2254
Date: Mon, 07 Jan 2008 17:19:26 GMT
.drgind_fly{z-index:1000;top:40;left:40;position:absolute;}.drgind_internal{opacity:.93;filter:alpha(opacity=93);position:absolute;}.drgind_wordcut{padding:0 0 0 3px;width:200px;overflow:hidden;float:left;white-space:nowrap;}.drgind_text{border-top-width:1px;border-top-style:solid;border-bottom-width:2px;
border-bottom-style:solid;border-right-width:2px;border-right-style:solid;}.drgind_marker{border-top-width:1px;border-top-style:solid;border-bottom-width:2px;
border-bottom-style:solid;border-left-width:1px;border-left-style:solid;vertical-align:top;}.drgind_reject .drgind_marker{background-color:#EF6771;border-top-color:#96000B;border-left-color:#96000B;border-bottom-color:#96000B;vertical-align:top;}.drgind_accept .drgind_marker,.drgind_default .drgind_marker{background-color:#9CDC48;border-top-color:#589900;border-left-color:#589900;border-bottom-color:#589900;vertical-align:top;}.drgind_text{
border-top-color:#D4CFC7;border-bottom-color:#D4CFC7;border-right-color:#D4CFC7;background-color:#EDEAE6;color:#000;}.drgind_text_content{color:#000;
font-weight:bold;font-family:Arial,Verdana,sans-serif;font-size:11px;}
(some newlines added for readability)
The actual content length is 1127 - half the value reported. There are no other filters wrapping these requests.
I have actually seem the CSS response with the Transfer-Encoding header, rather than Content-Length, but it is rare (possibly only the first request in a browser session). There may be some kind of race-condition somewhere in Richfaces. -
14. Re: Server Performance Problem with 3.1.3 (delays in loading
sergeysmirnov Jan 7, 2008 3:44 PM (in response to mmichalek)pmaho6, we still cannot reproduce the case. Do you have some clues who to reproduce it?