Hi,
so besides the h2 module which is specific of my machine,
the build still takes forever. So I took the build times
of the Hudson build server and reordered them from longer
to shorter, and then extracted the list of modules that
are sucking the first 50% of the build time (total build
time 715s, . Here is the list of the guilt modules and
their build times, these alone take more than 6 minutes:

ArcGrid datasource module 15.44
Validation Processor and Framework 17.09
Filter XML Support 17.36
Render 17.69
H2 DataStore 18.8
Metadata 19.47
GML3 XML Support 21.64
XML Parsing Support 25.15
Shapefile module 27.06
Geometries 27.79
Grid Coverage module 28.97
Referencing services 29.45
Main module 32.82
EPSG Authority Service using HSQL database 62.25

Can each of these modules mantainer have a look
and see if there is any of the tests that can be
moved onto the extensive lot? There is a TestData.isExtensive()
method one can call to see if extensive tests are enabled.

I personally had a look into the EPSG authority one
and spotted a handful of tests that are using most of the time,
they are tests checking full scans of the db looking for
a code it's not there and a multithreaded load test. Making
them into "extensive" ones takes the build time of that
module down to 15s (quite a gain down from over one minute).
I've attached a patch, Martin, can you have a look at it
and see if it's ok to commit? (I guess the same patch can
be applied to 2.4.x to the same effect).

I also had a look at referencing, there is no specific test that's slow
on my machine (in fact on my pc it only takes 15 seconds to build).

Main takes time because it's big and whatnot, yet there is a specific
test that it's slow, and hits only windows (there is a check for the
operating system in the tests, the slow part is skipped on unix): DataUtilitiesTest.testUrlToFile.
In that test an attempt to access a network share is made
in handleFile( "\\\\host\\share\\file" ). Removing that check
brings the build time from 32 to 19 seconds on my pc....
I'm wondering if we should mark that one as "extensive" too.
The trouble is that extensive tests are run only during releases,
so that test would be run only if the person releasing is
running tests on windows.

In validation and gml3 I noticed there are single tests taking
5-10 seconds, so they may be candidate for slim down (maybe
they are using too much data) or be moved to extensive?

Besides that, all tests are building simple features and we
know that become much slower on trunk, so build times are probably
going to get down a little when someone finds time to optimize out
the current implementation.

Cheers
Andrea
Index: src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorTest.java
===================================================================
--- src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorTest.java	(revisione 28538)
+++ src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorTest.java	(copia locale)
@@ -7,6 +7,7 @@
 
 import junit.framework.TestCase;
 
+import org.geotools.TestData;
 import org.geotools.factory.Hints;
 import org.geotools.geometry.DirectPosition2D;
 import org.geotools.referencing.AbstractIdentifiedObject;
@@ -91,6 +92,9 @@
         assertEquals("The CRS should still in the cache.","EPSG:4326", id);
     }
     public void testFindBeijing1954() throws FactoryException {
+        if(!TestData.isExtensiveTest())
+            return;
+        
         /*
          * The PROJCS below intentionally uses a name different from the one found in the
          * EPSG database, in order to force a full scan (otherwise the EPSG database would
Index: src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgFactoryTest.java
===================================================================
--- src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgFactoryTest.java	(revisione 28538)
+++ src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgFactoryTest.java	(copia locale)
@@ -3,6 +3,7 @@
 import java.sql.Connection;
 import java.util.Set;
 
+import org.geotools.TestData;
 import org.geotools.factory.Hints;
 import org.geotools.geometry.DirectPosition2D;
 import org.geotools.referencing.AbstractIdentifiedObject;
@@ -90,6 +91,9 @@
         assertEquals("The CRS should still be in the cache.","EPSG:4326", id);
     }
     public void testFindBeijing1954() throws FactoryException {
+        if(!TestData.isExtensiveTest())
+            return;
+        
         /*
          * The PROJCS below intentionally uses a name different from the one found in the
          * EPSG database, in order to force a full scan (otherwise the EPSG database would
Index: src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorStressTest.java
===================================================================
--- src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorStressTest.java	(revisione 28538)
+++ src/test/java/org/geotools/referencing/factory/epsg/HsqlDialectEpsgMediatorStressTest.java	(copia locale)
@@ -27,6 +27,7 @@
 import net.sourceforge.groboutils.junit.v1.MultiThreadedTestRunner;
 import net.sourceforge.groboutils.junit.v1.TestRunnable;
 
+import org.geotools.TestData;
 import org.geotools.factory.Hints;
 import org.geotools.geometry.DirectPosition2D;
 import org.geotools.referencing.CRS;
@@ -59,6 +60,8 @@
     }
     
     public void testRunners() throws Throwable {
+        if(!TestData.isExtensiveTest())
+            return;
         
         TestRunnable runners[] = new TestRunnable[RUNNER_COUNT];
         for (int i = 0; i < RUNNER_COUNT; i++) {
Index: src/test/java/org/geotools/referencing/factory/epsg/DialectEpsgMediatorTest.java
===================================================================
--- src/test/java/org/geotools/referencing/factory/epsg/DialectEpsgMediatorTest.java	(revisione 28538)
+++ src/test/java/org/geotools/referencing/factory/epsg/DialectEpsgMediatorTest.java	(copia locale)
@@ -3,6 +3,7 @@
 import java.sql.Connection;
 import java.util.Set;
 
+import org.geotools.TestData;
 import org.geotools.factory.Hints;
 import org.geotools.geometry.DirectPosition2D;
 import org.geotools.referencing.AbstractIdentifiedObject;
@@ -60,6 +61,9 @@
     }
 
     public void testFindWSG84() throws FactoryException {
+        if(!TestData.isExtensiveTest())
+            return;
+        
         String wkt;
         wkt = "GEOGCS[\"WGS 84\",\n"                                    +
               "  DATUM[\"World Geodetic System 1984\",\n"               +
@@ -89,6 +93,9 @@
         assertNotNull("The CRS should still in the cache.",finder.findIdentifier(crs));
     }
     public void testFindBeijing1954() throws FactoryException {
+        if(!TestData.isExtensiveTest())
+            return;
+        
         /*
          * The PROJCS below intentionally uses a name different from the one found in the
          * EPSG database, in order to force a full scan (otherwise the EPSG database would
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to