Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Performance Improvements in loading xsd resource
Performance Improvements in loading xsd resource [message #26420] Sun, 17 August 2003 09:57 Go to next message
Hayden Marchant is currently offline Hayden Marchant
Messages: 90
Registered: July 2009
Member
I would like to know if there's anyway I can improve the performance of
reading of an xsd schema. I run my code in a profiler a lot of the time is
spent in this part of the code. If I know that the xsd is valid, and I'm
not concerned about errors, is there something I can turn off while
reading?

I am currently using the following code:

ResourceSet resourceSet = new ResourceSetImpl();


resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "*",
new XSDResourceFactoryImpl());

resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
Boolean.TRUE);
final XSDResourceImpl xsdMainResource = (XSDResourceImpl)
resourceSet.getResource(uri, true);
XSDSchema xsdSchema = xsdMainResource.getSchema();


Thanks,
Hayden Marchant
Re: Performance Improvements in loading xsd resource [message #26455 is a reply to message #26420] Mon, 18 August 2003 08:11 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

Hayden,

Not tracking the location may speed things up a little, but other than that,
performance tuning in the model code is required.


Hayden Marchant wrote:

> I would like to know if there's anyway I can improve the performance of
> reading of an xsd schema. I run my code in a profiler a lot of the time is
> spent in this part of the code. If I know that the xsd is valid, and I'm
> not concerned about errors, is there something I can turn off while
> reading?
>
> I am currently using the following code:
>
> ResourceSet resourceSet = new ResourceSetImpl();
>
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "*",
> new XSDResourceFactoryImpl());
>
> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
> Boolean.TRUE);
> final XSDResourceImpl xsdMainResource = (XSDResourceImpl)
> resourceSet.getResource(uri, true);
> XSDSchema xsdSchema = xsdMainResource.getSchema();
>
> Thanks,
> Hayden Marchant
Re: Performance Improvements in loading xsd resource [message #575952 is a reply to message #26420] Mon, 18 August 2003 08:11 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25746
Registered: July 2009
Senior Member
Hayden,

Not tracking the location may speed things up a little, but other than that,
performance tuning in the model code is required.


Hayden Marchant wrote:

> I would like to know if there's anyway I can improve the performance of
> reading of an xsd schema. I run my code in a profiler a lot of the time is
> spent in this part of the code. If I know that the xsd is valid, and I'm
> not concerned about errors, is there something I can turn off while
> reading?
>
> I am currently using the following code:
>
> ResourceSet resourceSet = new ResourceSetImpl();
>
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "*",
> new XSDResourceFactoryImpl());
>
> resourceSet.getLoadOptions().put(XSDResourceImpl.XSD_TRACK_L OCATION,
> Boolean.TRUE);
> final XSDResourceImpl xsdMainResource = (XSDResourceImpl)
> resourceSet.getResource(uri, true);
> XSDSchema xsdSchema = xsdMainResource.getSchema();
>
> Thanks,
> Hayden Marchant
Previous Topic:Performance Improvements in loading xsd resource
Next Topic:sequence in extesion type ignored
Goto Forum:
  


Current Time: Sat Apr 19 18:45:51 EDT 2014

Powered by FUDForum. Page generated in 0.08340 seconds