768819298ae304bd2bd8d07ec6d0421eb65d40ab larrym Thu Jul 21 15:00:49 2011 -0700 use smaller hash size in tdbExtrasAddOrUpdate to fix a performance issue (see redmine 4620 and 4674) diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c index 67838af..ba5293a 100644 --- src/hg/lib/trackDbCustom.c +++ src/hg/lib/trackDbCustom.c @@ -846,31 +846,31 @@ printf("tdbFillInAncestry(%s): has %d children.",parentTrack,slCount(tdb->parent->subtracks)); //tdb->parent = tdbFindOrCreate(db,tdb,parentTrack); // Now there are 2 versions of this child! And what to do about views? } if (conn != NULL) hFreeConn(&conn); return tdb; } #endif///def OMIT void tdbExtrasAddOrUpdate(struct trackDb *tdb,char *name,void *value) /* Adds some "extra" information to the extras hash. Creates hash if necessary. */ { if(tdb->extras == NULL) { - tdb->extras = hashNew(0); + tdb->extras = hashNew(7); hashAdd(tdb->extras, name, value); } else { hashReplace(tdb->extras, name, value); } } void tdbExtrasRemove(struct trackDb *tdb,char *name) /* Removes a value from the extras hash. */ { if(tdb->extras != NULL) hashMayRemove(tdb->extras, name); }