Index: /anuga_core/source/anuga/fit_interpolate/fit.py
===================================================================
--- /anuga_core/source/anuga/fit_interpolate/fit.py	(revision 4860)
+++ /anuga_core/source/anuga/fit_interpolate/fit.py	(revision 4861)
@@ -116,4 +116,6 @@
             self._build_smoothing_matrix_D()
             
+        self.mesh_boundary_polygon = self.mesh.get_boundary_polygon()    
+            
     def _build_coefficient_matrix_B(self,
                                   verbose = False):
@@ -268,5 +270,5 @@
         inside_poly_indices, outside_poly_indices  = \
                      in_and_outside_polygon(point_coordinates,
-                                            self.mesh.get_boundary_polygon(),
+                                            self.mesh_boundary_polygon,
                                             closed = True, verbose = verbose)
         #print "self.inside_poly_indices",self.inside_poly_indices
Index: /anuga_core/source/anuga/fit_interpolate/run_long_benchmark.py
===================================================================
--- /anuga_core/source/anuga/fit_interpolate/run_long_benchmark.py	(revision 4860)
+++ /anuga_core/source/anuga/fit_interpolate/run_long_benchmark.py	(revision 4861)
@@ -20,6 +20,6 @@
 # Simulating Cairns. Seemed to take too long to run.  Need to Try again.
  
-#maxArea_list = [0.00001]
-#num_of_points_list = [1863558]
+maxArea_list = [0.00001]
+num_of_points_list = [1863558]
 
 # a maxArea of 0.0001 gives 15568 triangles
@@ -50,6 +50,6 @@
 
 # Quick check
-maxArea_list = [0.61] 
-num_of_points_list = [4] 
+# maxArea_list = [0.61] 
+#num_of_points_list = [4] 
 
 
@@ -58,5 +58,5 @@
 max_points_per_cell_list = [13]
 use_file_type_list = ['pts']
-run_profile =   False # True #True # False #
+run_profile =   True #False # True #True # False #
 gridded_list = [True] #, False]
 
Index: /anuga_validation/automated_validation_tests/fitting/validate_benchmark_fit.py
===================================================================
--- /anuga_validation/automated_validation_tests/fitting/validate_benchmark_fit.py	(revision 4860)
+++ /anuga_validation/automated_validation_tests/fitting/validate_benchmark_fit.py	(revision 4861)
@@ -25,5 +25,5 @@
         #print "host", host
         ben = BenchmarkLeastSquares()
-        time, mem, num_tri = ben.trial(
+        time, mem, num_tri, one_t, more_t, quad_t = ben.trial(
             num_of_points=1000
             ,maxArea=0.0001
@@ -37,19 +37,19 @@
         if host.find('tornado') == 0 or host.find('compute-1') == 0:
             # Tornado headnode or node
-            time_standard = 15.1
+            time_standard = 11.5
             self.assert_(time<time_standard*1.2)
-            mem_standard = 18384 
+            mem_standard = 21280 
             self.assert_(mem<mem_standard*1.2)
             
         elif host.find('compute-0') == 0: # cyclone node
-            time_standard = 20.0
+            time_standard = 17.0
             self.assert_(time<time_standard*1.2)
-            mem_standard = 18924
+            mem_standard = 21168
             self.assert_(mem<mem_standard*1.2)
 
         elif host.find('cyclone') == 0: # cyclone headnode
-            time_standard = 13.9
+            time_standard = 11.8
             self.assert_(time<time_standard*1.2)
-            mem_standard = 18924 
+            mem_standard = 20500
             self.assert_(mem<mem_standard*1.2)
 
@@ -61,5 +61,5 @@
 
         elif host.find('pc-31569') == 0: # DSG's PC
-            time_standard = 31.0
+            time_standard = 26.1
             self.assert_(time<time_standard*1.2)
             
Index: /anuga_work/development/cairns_demo/runcairns.py
===================================================================
--- /anuga_work/development/cairns_demo/runcairns.py	(revision 4860)
+++ /anuga_work/development/cairns_demo/runcairns.py	(revision 4861)
@@ -1,2 +1,3 @@
+
 """Script for running a tsunami inundation scenario for Cairns, QLD Australia.
 
@@ -31,4 +32,8 @@
 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf
 from anuga.shallow_water.data_manager import dem2pts
+from anuga.fit_interpolate.search_functions import search_times, \
+     reset_search_times
+from anuga.fit_interpolate.general_fit_interpolate import \
+     get_build_quadtree_time
 
 # Application specific imports
@@ -39,6 +44,6 @@
 # Define scenario as either slide or fixed_wave.
 #------------------------------------------------------------------------------
-#scenario = 'slide' 
-scenario = 'fixed_wave'
+scenario = 'slide' 
+#scenario = 'fixed_wave'
 
 if os.access(scenario, os.F_OK) == 0:
@@ -95,4 +100,5 @@
 # Setup computational domain
 #------------------------------------------------------------------------------
+
 from anuga.abstract_2d_finite_volumes.pmesh2domain import pmesh_to_domain_instance
 from anuga.caching import cache
@@ -127,5 +133,8 @@
 tide = 0.0
 domain.set_quantity('stage', tide)
-domain.set_quantity('friction', 0.0) 
+domain.set_quantity('friction', 0.0)
+
+
+t0 = time.time()
 domain.set_quantity('elevation', 
                     filename=dem_name + '.pts',
@@ -134,6 +143,12 @@
                     alpha=0.1)
 
-
-
+print 'Fitting the elevation data took %.2f seconds' %(time.time()-t0)
+
+search_one_cell_time, search_more_cells_time = search_times()
+reset_search_times()
+print "search_one_cell_time",search_one_cell_time
+print "search_more_cells_time", search_more_cells_time
+print "build_quadtree_time", get_build_quadtree_time()
+import sys; sys.exit() 
 #------------------------------------------------------------------------------
 # Setup information for slide scenario (to be applied 1 min into simulation
@@ -184,5 +199,4 @@
 #------------------------------------------------------------------------------
 
-import time
 t0 = time.time()
 
