You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Stephen Haberman (JIRA)" <ji...@apache.org> on 2013/02/23 08:00:14 UTC

[jira] [Commented] (IVYDE-329) Disable DTD external fetching when not validation

    [ https://issues.apache.org/jira/browse/IVYDE-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585061#comment-13585061 ] 

Stephen Haberman commented on IVYDE-329:
----------------------------------------

Hi. After 3-4 months, this happened again to me today, and was quite frustrating--the Eclipse UI thread blocks and I had to restart Eclipse on a regular basis.

Based on Maarten's feedback, I revamped my patch to leave the existing functionality as-is for everything except for IvyDE's IvySettingsContentDescriber, which disables looking up external DTDs.

This should be fine, as IvySettingsContentDescriber only reads an XML file looking for a root "ivysettings" element. I also did the same thing for IvyFileContentDescriber.

Sorry for having multiple patches uploaded; I'll see if I can delete the old ones.
                
> Disable DTD external fetching when not validation
> -------------------------------------------------
>
>                 Key: IVYDE-329
>                 URL: https://issues.apache.org/jira/browse/IVYDE-329
>             Project: IvyDE
>          Issue Type: Improvement
>         Environment: Ivy 2.4.0.alpha/IvyDE 2.2.0.beta2
>            Reporter: Stephen Haberman
>         Attachments: ivyde-xml-dtd-hung.txt, optionalExternalDtds.diff, optionalExternalDtds-ivyde.diff
>
>
> Our team uses Ivy/IvyDE, and noticed Eclipse hanging today/yesterday, to the point of being unusable.
> I tracked it down to Eclipse asking IvyDE "is this your file?", which  IvyDE's IvySettingsContentDescriber used XMLHelper.parse to answer, but then Xerces hung while trying to load the XML file's DTD.
> So, the problem was the DTD being unavailable, but it seems like XMLHelper should turn this off, especially if the schema parameter is null, and it's in non-validating mode.
> The attached patch turns off external DTD fetching when XMLHelper is already in non-validating mode.
> This avoids the wire call, which speeds up the XMLHelper.parse by at least 100%, ~250-300ms when fetching the DTD, to ~100-150ms when not. (And this is the happy case, in the worst case, waiting for the timeout if the DTD is unavailable, takes ~20s).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira