Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Resolver attempts to resolve XSDs from w3c.org site [rename] #253

@dizzzz

Description

@dizzzz

Hi Norm,

Thank you for your great work on the XML resolver!

Version: most recent 6.x (resolver + data)

I'd like to consult you on something..... I have integrated theresolver in some some junit tests, basically to explore how the APIs can be used.

It appears that there are significant performance differences between running these tests on my VDI (virtualized PC, Windows 10) and my build agent (Tests run in Java21 linux docker container, which runs on a Linux bamboo agent.)

There are only 4 tests, taking 0.25s on windows, and 131s (!) on docker. Leaving out the preparation/test code, this is the pseudo code:

Good old EntityResolver

final InputSource inputSource = resolver.getEntityResolver().resolveEntity(TestShared.XMLSIG_NS, TestShared.XMLSIG_NS);

For sure the Entity2Resolver

 final InputSource inputSource = resolver.getEntityResolver2().resolveEntity(TestShared.XMLSIG_NS, TestShared.XMLSIG_NS);

The LSResourceResolver

final LSInput lsInput = resolver.getLSResourceResolver().resolveResource(ResolverConstants.NATURE_XML_SCHEMA, TestShared.XMLSIG_NS, null, null, null);

And the internal API

final ResourceRequest resourceRequest = resolver.getRequest(TestShared.XMLSIG_NS, null);
final ResourceResponse resourceResponse = resolver.resolve(resourceRequest);

Also nicely integrated with a parser and validator, the performance is so off expectations.

Do you have an idea why the difference in speed is so significant? Any idea where I should start looking?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions