FeatureChainingTest build time/mem improvement
----------------------------------------------

                 Key: GEOT-2608
                 URL: http://jira.codehaus.org/browse/GEOT-2608
             Project: GeoTools
          Issue Type: Improvement
          Components: data app-schema
            Reporter: Ben Caradoc-Davies
            Assignee: Ben Caradoc-Davies
         Attachments: FeatureChainingTest.patch

{code}
Subject: app-schema build time/mem
Date: Fri, 10 Jul 2009 04:34:59 +0800
From: Gabriel Roldan 
To: Geotools-Devel list ,       "Caradoc-Davies, Ben (E&M, Kensington)" 
,"Angreani, Rini (E&M, Kensington)", Justin Deoliveira , Andrea Aime 

Hi all,

I took some time to dig a bit into app-schema build times and got some 
interesting results.

I've grabbed the profiler and ran the test suite, then I got one of the 
most time/mem consuming tests, FeatureChainingTest and profiled it alone.
Aside, I actually doubt it is one of the most offending ones, but just 
where the profiler went crazy with 512m heap when running the test 
suite, which makes me think there're some serious memory leaks at the 
feature type registry or close to it.

Still, I was able to reduce the needs of FetureChainingTest from 255M of 
Heap and 27 seconds build time to 102M Heap and 9.2 seconds build time.

That is achieved by the attached patch, which converts the test to JUnit 
4 and uses @BeforeClass and @AfterClass methods to set up the needed 
DataAccesses once for the whole suite.

I guess we can do the same for most of the test suites, except for the 
few that actually assert the loading of a configuration. But other than 
those, they should be all read-only tests, since app-schema support is 
read only after all, so we could migrate them to one time loading.


That said, I'd be glad in keep investigating the source of the leaks AND 
in helping redesign the schema parser so it does not parses ALL the 
types and top level elements in the xsd schemas but only the ones needed 
by the mappings. Those two improvements I'm pretty sure will provide a 
substantial difference in startup time and memory requirements for the 
module.

So, ok to commit the patch to FeatureChainingTest? Rini do you want to 
go through the rest of them and refactor like I did for this one?

Cheers,

Gabriel
-- 
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.
{code}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to