Hi Niels, On Thu, Mar 31, 2011 at 1:57 AM, Niels <[email protected]> wrote:
> Hey Justin, > > Some questions and remarks with respect to the schema building memory leak > and things I came across working on it. > > (1) The class SchemaLocator is a final class. Is there a specific reason > for that? > Its method - locating purely on namespace - is not good for app-schema, as > one namespace can have many multiple schema's. Would it be okay for me to > remove the final modifier from the class so I can extend it for app-schema > XSD's? > Sure, no problem. > > (2) After clearing out all directive & substitution group references of a > schema, I noticed that a lot of schema's still kept hanging around. The > reason for that appeared to be through SchemaIndexImpl instances that kept > hanging around through adapters. Though I noticed you've been aware of that > yourself because you added a 'destroy' method that cleans it up. However, > that destroy method is never called in app-schema :/ A blame for the > app-schema developers... > > Easy to miss :) > (3) About the same SchemaIndexImpl. I noticed that these are usually built > from an array of XSDSchema instances, usually all dependencies are included > in this array. I noticed this is actually unnecessary work. If a schema is > built with dependencies on other schema's, all elements of the > imported/included schema's are automatically incorporated in the main schema > by the EMF framework. If we only passed on the main schema to the > SchemaIndexImpl without the dependencies, the result would be the same with > less work. Just something I noticed. > Well not always... i have seen situations in the past where the schema being imported does not get incorporated into the importing schema. I can't remember exactly what the cause is but in some situations (like where the schemas being parsed does nto actually reference properly a schema it depends on). So it is kind of a defensive measure. > (4) Notice that the WFS XSD classes already had a flush() method, but these > are no good. All they do is set the schema to null inside the object... but > doesn't remove references from static GML object. I made a complete flush > method in the XSD base class, and removed the ones from the WFS classes. > Anywhere where flush is already called, the schema is now properly cleaned > up. > Nice! Look forward to the patch! > > I am basically finished and will upload the patches soon. I will add some > more remarks and explanations then. > > Regards > > -- > *Niels Charlier* > > Software Engineer > CSIRO Earth Science and Resource Engineering > Phone: +61 8 6436 8914 > > Australian Resources Research Centre > 26 Dick Perry Avenue, Kensington WA 6151 > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial.
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
