ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (JIRA)" <>
Subject [jira] [Commented] (IVY-1386) Disable DTD external fetching when not validation
Date Sat, 27 Oct 2012 19:59:11 GMT


Maarten Coene commented on IVY-1386:

I also did a quick test

for instance, consider this xml:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE doc SYSTEM \"Test.dtd\">
<doc>a &foo;</doc>

and this Test.dtd:
<!ENTITY foo "foo">

Without the patch, the SAX handler receives 'a foo' as content of the <doc>-element.
When I apply your patch, the SAX handler receives 'a' as content. So it seems the &foo;
entity is ignored.
> Disable DTD external fetching when not validation
> -------------------------------------------------
>                 Key: IVY-1386
>                 URL:
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: trunk
>         Environment: Ivy 2.4.0.alpha/IvyDE 2.2.0.beta2
>            Reporter: Stephen Haberman
>         Attachments: disableExternalDtds.diff, ivyde-xml-dtd-hung.txt
> 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
> 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:

View raw message