On 23/05/13 14:26, Andrea Aime wrote: > On Thu, May 23, 2013 at 5:48 AM, Ben Caradoc-Davies > <ben.caradoc-dav...@csiro.au <mailto:ben.caradoc-dav...@csiro.au>> wrote: > http://www.w3.org/2001/xml.xsd > Ah, this one is a nightmare, it's always super-slow to download (I guess > because > anything XML ends up linking it). > Imho, we should have a copy of it baked directly into code to avoid > downloading it > over and over.
Placing this file as /org/w3/www/2001/xml.xsd on the classpath (in any jar) will cause SchemaResolver to pick it up before hitting SchemaCache. The gt-xml jar is a good place. This is currently being imported via the new xlink.xsd and smil20.xsd (since the great XLink change of 2012). > (1) Why do you set a timeout at all? Just a best practice to avoid an > application hang? (Good idea!) If so, the obvious workaround is to > increase the timeout (60 seconds?) to accommodate slow servers. Would > this be a satisfactory solution? > I'd say, make it configurable. 10 seconds to start responding in 2013 is > not slow, > it's a geologic era... Good idea. But what default? Java 6 defaults to waiting indefinitely, which will never fail[*]. :-D [*] Depending on your definition of failure, of course. > The original AppSchemaCache had no timeout and did not write to a file > until it had all the bytes of the remote resource, so 9.x is not > affected by these issues. > Right right, good idea to complete the write on disk only when the download > is complete to avoid half downloaded files. But keeping everything in memory > could be dangerous, maybe write a temp file and rename it to the final > destination once done The resources are only kilobytes. Using a temp file is Mauro's solution to parallel thread support; the temp copy is discarded after use (the first thread uses a non-temp location). A subtle change to this behaviour could be a solution. Kind regards, -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel