Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343163

Summary: ValBuilderJob slows down the eclipse significantly when trying to access w3.org domain
Product: [WebTools] WTP Source Editing Reporter: Dimitar Giormov <dimitar.giormov>
Component: wst.sseAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P2 CC: ccc, david_williams, nsand.dev
Version: 3.2.3Flags: nsand.dev: review+
thatnitind: review+
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
fix nsand.dev: iplog+

Description Dimitar Giormov CLA 2011-04-18 10:44:48 EDT
w3.org has restricted the access to it's site from java clients.
See: http://www.w3.org/2005/06/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic
So whenever ValBuilderJob tries to open connection to w3.org the connection and the job stalls for 30 sec, which can cause significant slowdown.

Problem is explained in detail here:
http://www.vineetmanohar.com/2010/11/w3-org-dtds-blocked-from-java-http-500/
Comment 1 Stefan Dimov CLA 2011-05-20 09:33:49 EDT
Created attachment 196217 [details]
fix

The plugin org.eclipse.wst.standard.schemas contributes loose.dtd and strict.dtd to the XML catalog, but in case the public id in a n xml header is different from "-//W3C//DTD HTML 4.01 Transitional//EN" the validation doesn't use the local dtd files. This patch add both dtds in the XML catalog as URIs
Comment 2 Carl Anderson CLA 2011-08-11 14:45:18 EDT
org.eclipse.wst.standard.schemas is in Source Editing. 
This looks like something that was overlooked that can boost our performance.
Comment 3 David Williams CLA 2011-08-11 15:53:33 EDT
I am not doubting it, but is surprising we'd missed this all these years. I know years ago, we tried to find all code that might have been accessing w3.org. So ... I'm wondering ... what kind of file is this? Is it named "xml" by any chance? But using HTML? Doesn't really matter (fix should still be made) but, I'd recommend testing with HTML, XHTML, and XML. I know for some of the HTMLs, we purposely do not use the DTDs to validate, but have "built in" content models via Java code. And chance you are working with a "reduced" set of plugins? And maybe have left out HTML ones? 

At any rate, thanks for reporting ... sounds important.
Comment 4 Nick Sandonato CLA 2011-08-12 14:11:40 EDT
Looks appropriate to me. Adding project lead for review.
Comment 5 Nick Sandonato CLA 2011-08-12 14:46:15 EDT
Code released. Thanks for the patch.