src/hg/featureBits/featureBits.c 1.56
1.56 2009/12/04 23:56:58 hiram
Really do not contact the database unless it is actually required
Index: src/hg/featureBits/featureBits.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/featureBits/featureBits.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -b -B -U 4 -r1.55 -r1.56
--- src/hg/featureBits/featureBits.c 9 Aug 2009 07:29:28 -0000 1.55
+++ src/hg/featureBits/featureBits.c 4 Dec 2009 23:56:58 -0000 1.56
@@ -721,8 +721,9 @@
continue;
}
else
{
+ if (NULL == conn) conn = hAllocConn(database);
if (sqlTableExists(conn, t))
continue;
}
found = FALSE;
@@ -801,9 +802,10 @@
chromInfoList = chromInfoLoadAll(chromSizes);
else
chromInfoList = fbCreateChromInfoList(clChrom, database);
-conn = hAllocConn(database);
+if (!countGaps)
+ conn = hAllocConn(database);
checkInputExists(conn, database, chromInfoList, tableCount, tables);
if (!faIndependent)
{