e72cf0100e06d6fadb7282d4e7eb2c592f320951
galt
  Mon Jul 4 13:08:35 2011 -0700
Adding parallel-fetch loading of remote bigDataUrl tracks using pthreads
diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index 246cf7b..e10c3db 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -12181,41 +12181,44 @@
     gvfMethods(track);
     }
 #endif /* GBROWSE */
 }
 
 static void compositeLoad(struct track *track)
 /* Load all subtracks */
 {
 struct track *subtrack;
 long thisTime = 0, lastTime = 0;
 for (subtrack = track->subtracks; subtrack != NULL; subtrack = subtrack->next)
     {
     if (isSubtrackVisible(subtrack) &&
 	( limitedVisFromComposite(subtrack) != tvHide))
 	{
+	if (!subtrack->parallelLoading)
+	    {
 	lastTime = clock1000();
 	if (!subtrack->loadItems) // This could happen if track type has no handler (eg, for new types)
 	    errAbort("Error: No loadItems() handler for subtrack (%s) of composite track (%s) (is this a new track 'type'?)\n", subtrack->track, track->track);
         subtrack->loadItems(subtrack);
 	if (measureTiming)
 	    {
 	    thisTime = clock1000();
 	    subtrack->loadTime = thisTime - lastTime;
 	    lastTime = thisTime;
 	    }
 	}
+	}
     else
 	{
 	subtrack->limitedVis = tvHide;
 	subtrack->limitedVisSet = TRUE;
 	}
     }
 }
 
 static int compositeTotalHeight(struct track *track, enum trackVisibility vis)
 /* Return total height of composite track and set subtrack->height's. */
 {
 struct track *subtrack;
 int height = 0;
 for (subtrack = track->subtracks; subtrack != NULL; subtrack = subtrack->next)
     {