d8be7e6e88c0712589dac72c1f023c84028a0d1c
angie
  Wed Feb 7 11:49:17 2018 -0800
To prevent joinerRoute from searching over all databases for routes from some genome db to hgFixed metadata tables, add a new optional arg to joinerRelate to apply joinerExclusiveCheck to the genome db in addition to the current table's database.
This reduces the time to find the route hg19.refSeqAli --> hgFixed.gbCdnaInfo --> hgFixed.cds from ~1.5s to ~0.1s.  It also keeps the related-table selection in hgTables and hgIntegrator from showing >5000 related tables when starting with a genome db table and adding hgFixed.gbCdnaInfo.
refs #20949

diff --git src/hg/hgTables/schema.c src/hg/hgTables/schema.c
index 617fc73..3408294 100644
--- src/hg/hgTables/schema.c
+++ src/hg/hgTables/schema.c
@@ -386,31 +386,31 @@
 if (date != NULL)
     printf("&nbsp&nbsp<B> Data last updated:&nbsp;</B>%s<BR>\n", date);
 if (asObj != NULL)
     hPrintf("<B>Format description:</B> %s<BR>", asObj->comment);
 if (cartTrackDbIsNoGenome(db, table))
     hPrintf(" Note: genome-wide queries are not available for this table.");
 describeFields(db, splitTable, asObj, conn);
 if (tdbForConn != NULL)
     {
     char *type = tdbForConn->type;
     if (startsWithWord("bigWig", type))
 	printf("<BR>This table points to a file in "
 	       "<A HREF=\"/goldenPath/help/bigWig.html\" TARGET=_BLANK>"
 	       "BigWig</A> format.<BR>\n");
     }
-jpList = joinerRelate(joiner, db, table);
+jpList = joinerRelate(joiner, db, table, NULL);
 
 /* sort and unique list */
 slUniqify(&jpList, joinerPairCmpOnAandB, joinerPairFree);
 
 if (jpList != NULL)
     {
     webNewSection("Connected Tables and Joining Fields");
     for (jp = jpList; jp != NULL; jp = jp->next)
 	{
 	if (cartTrackDbIsAccessDenied(jp->b->database, jp->b->table))
 	    continue;
 	struct joinerSet *js = jp->identifier;
 	boolean aViaIndex, bViaIndex;
 	hPrintSpaces(6);
 	hPrintf("%s.", jp->b->database);