[
https://jira.jboss.org/jira/browse/RF-4498?page=com.atlassian.jira.plugin...
]
Nick Belaevski resolved RF-4498.
--------------------------------
Resolution: Partially Completed
Assignee: Tsikhon Kuprevich (was: Nick Belaevski)
New updated version of CSS compressor has been committed. It still cannot handle /*/
inside url: e.g.
body {background-image:url(/*/image.gif)}
Please reopen the issue if you need this condition to be handled correctly.
EndlessLoop in CssCompressor
----------------------------
Key: RF-4498
URL:
https://jira.jboss.org/jira/browse/RF-4498
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Environment: Browser independent
Reporter: andreas_back
Assignee: Tsikhon Kuprevich
Priority: Critical
Fix For: 3.3.0
When starting our application under RF 3.2.2 GA Tomcat consumes (on a
Quad-Core-Processor) 25 % of the overall CPU performance, if the first page of the
application is requested.
After adding
set CATALINA_OPTS="-Dcom.sun.management.jmxremote"
to the startup.bat and starting jconsole it was found the time is consumed in line 41 of
CssCompressor.java,
see the code fragment.
sb = new StringBuffer(srcsb.toString());
while ((startIndex = sb.indexOf("/*")) >= 0) {
endIndex = sb.indexOf("*/", startIndex + 2);
if (endIndex >= startIndex + 2)
sb.delete(startIndex, endIndex + 2);
}
A simple code analysis shows that the code starts an endless loop for example for
the string
/*/
If the parameter org.ajax4jsf.COMPRESS_STYLE is set to false
then the endless loop disappears.
It could be noted that the single string in the CssCompressorTest class
does not contain the comment /* or */.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira