Index: /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c	(revision 38428)
+++ /branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c	(revision 38429)
@@ -24,4 +24,27 @@
 int gfits_collect_table_gzp2 (FTable *table, TableField *field, char *raw, int row_start, int Nrows);
 
+static float timeSum1 = 0.0;
+static float timeSum2 = 0.0;
+static float timeSum2a = 0.0;
+static float timeSum2b = 0.0;
+static float timeSum2c = 0.0;
+static float timeSum2d = 0.0;
+static float timeSum2e = 0.0;
+static float timeSum3 = 0.0;
+
+void gfits_compress_timing () {
+  fprintf (stderr, "cmp times: %f %f %f\n", timeSum1, timeSum2, timeSum3);
+  fprintf (stderr, "cmp times: %f %f %f %f %f\n", timeSum2a, timeSum2b, timeSum2c, timeSum2d, timeSum2e);
+
+  timeSum1 = 0.0;
+  timeSum2 = 0.0;
+  timeSum2a = 0.0;
+  timeSum2b = 0.0;
+  timeSum2c = 0.0;
+  timeSum2d = 0.0;
+  timeSum2e = 0.0;
+  timeSum3 = 0.0;
+}
+
 int gfits_compress_table (FTable *srctable, FTable *tgttable, int ztilelen, char *zcmptype) {
 
@@ -35,4 +58,9 @@
   Header *srcheader = srctable->header;
   Header *tgtheader = tgttable->header;
+
+  // XXX EAM:
+  struct timeval startTimer, stopTimer;
+  float dtime;
+  gettimeofday (&startTimer, (void *) NULL);
 
   int Ntile, ztilelast;
@@ -64,4 +92,10 @@
   if (!gfits_scan (srcheader, "TFIELDS", "%d", 1, &Nfields)) ESCAPE;
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum1 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   TableField *fields = NULL;
   ALLOCATE_ZERO (fields, TableField, Nfields);
@@ -181,4 +215,10 @@
   gfits_dump_raw_table (srctable, "cmp");
 
+  // XXX TIMER 2
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum2 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   // compress the data : copy into a tile, compress the tile, then add to the output table
   // each tile -> 1 row of the output table
@@ -186,4 +226,6 @@
 
     for (j = 0; j < Nfields; j++) {
+
+      gettimeofday (&startTimer, (void *) NULL);
 
       int Nrows = (i == Ntile - 1) ? ztilelast : ztilelen;
@@ -199,4 +241,10 @@
       }
       
+      // XXX TIMER 2a
+      gettimeofday (&stopTimer, (void *) NULL); 
+      dtime = DTIME (stopTimer, startTimer);
+      timeSum2a += dtime;
+      gettimeofday (&startTimer, (void *) NULL);
+  
       if (VERBOSE_DUMP) {
 	int k;
@@ -217,4 +265,10 @@
       }
 
+      // XXX TIMER 2b
+      gettimeofday (&stopTimer, (void *) NULL); 
+      dtime = DTIME (stopTimer, startTimer);
+      timeSum2b += dtime;
+      gettimeofday (&startTimer, (void *) NULL);
+  
       if (VERBOSE_DUMP) {
 	int k;
@@ -231,4 +285,10 @@
       if (!gfits_compress_data (zdata, &Nzdata, fields[j].zctype, NULL, NULL, 0, raw, Nraw, fields[j].pixsize, 0, 0)) ESCAPE;
       
+      // XXX TIMER 2c
+      gettimeofday (&stopTimer, (void *) NULL); 
+      dtime = DTIME (stopTimer, startTimer);
+      timeSum2c += dtime;
+      gettimeofday (&startTimer, (void *) NULL);
+  
       if (VERBOSE_DUMP) {
 	int k;
@@ -250,4 +310,10 @@
       }
 
+      // XXX TIMER 2d
+      gettimeofday (&stopTimer, (void *) NULL); 
+      dtime = DTIME (stopTimer, startTimer);
+      timeSum2d += dtime;
+      gettimeofday (&startTimer, (void *) NULL);
+  
       if (VERBOSE_DUMP) {
 	int k;
@@ -262,4 +328,10 @@
 
       if (!gfits_varlength_column_add_data (tgttable, zdata, Nzdata, i, &fields[j].zdef)) ESCAPE;
+      // XXX TIMER 2e
+      gettimeofday (&stopTimer, (void *) NULL); 
+      dtime = DTIME (stopTimer, startTimer);
+      timeSum2e += dtime;
+      gettimeofday (&startTimer, (void *) NULL);
+ 
     }
   }
@@ -268,4 +340,10 @@
     if (!gfits_varlength_column_finish (tgttable, &fields[i].zdef)) ESCAPE;
   }
+
+  // XXX TIMER 3
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum3 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
 
   gfits_dump_cmp_table (tgttable, "cmp");
Index: /branches/eam_branches/ohana.20150429/src/libfits/table/F_table_varlength.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/table/F_table_varlength.c	(revision 38428)
+++ /branches/eam_branches/ohana.20150429/src/libfits/table/F_table_varlength.c	(revision 38429)
@@ -119,12 +119,10 @@
 void *gfits_varlength_column_pointer (FTable *ftable, VarLengthColumn *column, off_t row, off_t *length) {
 
-  void *result;
-  off_t offset, Nx;
-
   if ((column->mode != 'P') && (column->mode != 'Q')) abort();
 
   // find the values for the specified row
   // the values in the main table for this row and varlength column:
-  Nx = ftable->header->Naxis[0];
+  off_t Nx = ftable->header->Naxis[0];
+  off_t offset = 0;
 
   if (column->mode == 'P') {
@@ -143,5 +141,5 @@
   // fprintf (stderr, "length: %d, offset: %d\n", (int) *length, (int) offset);
 
-  result = (void *) (ftable->buffer + ftable->heap_start + offset);
+  void *result = (void *) (ftable->buffer + ftable->heap_start + offset);
   return result;
 }
Index: /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c	(revision 38428)
+++ /branches/eam_branches/ohana.20150429/src/libfits/table/F_uncompress_T.c	(revision 38429)
@@ -58,6 +58,6 @@
 
 void gfits_uncompress_timing () {
-  fprintf (stderr, "times: %f %f %f\n", timeSum1, timeSum2, timeSum3);
-  fprintf (stderr, "times: %f %f %f %f %f %f\n", timeSum2a, timeSum2b, timeSum2c, timeSum2d, timeSum2e, timeSum2f);
+  fprintf (stderr, "unc times: %f %f %f\n", timeSum1, timeSum2, timeSum3);
+  fprintf (stderr, "unc times: %f %f %f %f %f %f\n", timeSum2a, timeSum2b, timeSum2c, timeSum2d, timeSum2e, timeSum2f);
 
   timeSum1 = 0.0;
Index: /branches/eam_branches/ohana.20150429/src/libfits/test/tcomptiming.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/libfits/test/tcomptiming.c	(revision 38428)
+++ /branches/eam_branches/ohana.20150429/src/libfits/test/tcomptiming.c	(revision 38429)
@@ -8,5 +8,5 @@
 char *cmptype[] = {"NONE", "NONE_1", "NONE_2", "GZIP_1", "GZIP_2", "RICE_1", "RICE_ONE", "AUTO", NULL};
 
-static int Nval = 1000000;
+static int Nval = 10000000;
 
 int main (int argc, char **argv) {
@@ -24,6 +24,7 @@
   for (lNtile = 1.0; lNtile < lNtileMax; lNtile += 1.0) {
     int Ntile = pow (10.0, lNtile);
+    fprintf (stderr, "--- Ntile = %d ---\n", Ntile);
     test_compress_timing ("NONE_2", Ntile);
-    fprintf (stderr, "--- Ntile = %d ---\n", Ntile);
+    gfits_compress_timing();
     gfits_uncompress_timing();
   }
@@ -54,4 +55,17 @@
   ok (gfits_create_table (&header, &ftable), "created the basic table");
 
+  // XXX EAM:
+  struct timeval startTimer, stopTimer;
+  float dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
+  float timeSum1 = 0.0;
+  float timeSum2 = 0.0;
+  float timeSum3 = 0.0;
+  float timeSum4 = 0.0;
+  float timeSum5 = 0.0;
+  float timeSum6 = 0.0;
+  float timeSum7 = 0.0;
+
   char    *VAL_B;  ALLOCATE (VAL_B, char,    Nval);
   short   *VAL_I;  ALLOCATE (VAL_I, short,   Nval);
@@ -64,4 +78,10 @@
   srand48(A);
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum1 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   int i;
   for (i = 0; i < Nval; i++) {
@@ -74,4 +94,10 @@
   }     
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum2 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   // add the columns to the output array
   ok (gfits_set_bintable_column (&header, &ftable, "VAL_B", VAL_B, Nval), "set byte   table column");
@@ -82,4 +108,10 @@
   ok (gfits_set_bintable_column (&header, &ftable, "VAL_D", VAL_D, Nval), "set double table column");
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum3 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   Header *outheader = &header;
   FTable *outtable = &ftable;
@@ -107,4 +139,10 @@
   off_t Nrow;
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum4 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   char    *VAL_B_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_B", type, &Nrow, &Ncol); ok (!strcmp (type, "byte"),    "read byte    table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
   short   *VAL_I_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_I", type, &Nrow, &Ncol); ok (!strcmp (type, "short"),   "read short   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
@@ -113,4 +151,10 @@
   float   *VAL_E_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_E", type, &Nrow, &Ncol); ok (!strcmp (type, "float"),   "read float   table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
   double  *VAL_D_t = gfits_get_bintable_column_data (outheader, outtable, "VAL_D", type, &Nrow, &Ncol); ok (!strcmp (type, "double"),  "read double  table column"); ok (Nrow == Nval, "right number of rows"); ok (Ncol == 1, "right number of cols");
+
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum5 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
 
   // count mismatched values
@@ -131,4 +175,10 @@
   }
 
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum6 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
   ok (!NVAL_B_bad, "byte    values match (input vs output)");
   ok (!NVAL_I_bad, "short   values match (input vs output)");
@@ -144,4 +194,12 @@
     gfits_free_table (outtable);
   }
+  // XXX TIMER 1
+  gettimeofday (&stopTimer, (void *) NULL); 
+  dtime = DTIME (stopTimer, startTimer);
+  timeSum7 += dtime;
+  gettimeofday (&startTimer, (void *) NULL);
+
+  fprintf (stderr, "out times: %f %f %f %f %f %f %f\n", timeSum1, timeSum2, timeSum3, timeSum4, timeSum5, timeSum6, timeSum7);
+
   return TRUE;
 }
