W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2012

2002/css-validator/org/w3c/css/css DocumentParser.java,1.9,1.10

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 16 Feb 2012 13:29:24 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Ry1Om-0004sT-Ak@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/css
In directory hutz:/tmp/cvs-serv18719/css

Modified Files:
	DocumentParser.java 
Log Message:
switch back to TagSoup, as there are performance issues and memory usage issues with HTMLParser (the issue might be the way it is used, so it might be used again in the future)

Index: DocumentParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/DocumentParser.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- DocumentParser.java	30 Oct 2011 21:00:32 -0000	1.9
+++ DocumentParser.java	16 Feb 2012 13:29:22 -0000	1.10
@@ -57,8 +57,8 @@
                 style = parser.getStyleSheet();
             } else if (urlLower.endsWith(".html") || urlLower.endsWith(".htm") ||
                     urlLower.endsWith(".shtml") || urlLower.endsWith("/")) {
-                //TagSoupStyleSheetHandler handler = new TagSoupStyleSheetHandler(htmlURL, ac);
-                HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(htmlURL, ac);
+                TagSoupStyleSheetHandler handler = new TagSoupStyleSheetHandler(htmlURL, ac);
+                //HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(htmlURL, ac);
                 handler.parse(htmlURL);
                 style = handler.getStyleSheet();
                 if (style != null) {
@@ -110,10 +110,10 @@
                 }
 
                 if (contentType.match(MimeType.TEXT_HTML) == MimeType.MATCH_SPECIFIC_SUBTYPE) {
-                    HTMLParserStyleSheetHandler handler;
-                    handler = new HTMLParserStyleSheetHandler(htmlURL, ac);
-//                    TagSoupStyleSheetHandler handler;
-//                    handler = new TagSoupStyleSheetHandler(htmlURL, ac);
+//                    HTMLParserStyleSheetHandler handler;
+//                    handler = new HTMLParserStyleSheetHandler(htmlURL, ac);
+                    TagSoupStyleSheetHandler handler;
+                    handler = new TagSoupStyleSheetHandler(htmlURL, ac);
                     handler.parse(urlString, connection);
                     style = handler.getStyleSheet();
 
Received on Thursday, 16 February 2012 13:29:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:33 GMT