70668f5dd4d6bbcf079a1025649e17b9885335c7 angie Mon May 13 10:17:53 2013 -0700 Added 2 new args to annoStreamer:nextRow: minChrom and minEnd(which could also be called regionStart depending on point of view). Streamers may use those hints to skip over data that precedes minChrom and minEnd, to avoid the overhead of creating annoRows that annoGrators will then have to skip over. When primary data are sparse and grator data are very dense, this saves significant memory and user-cycles. Unfortunately mysql can still be the bottleneck for elapsed time. Room for improvement in annoStreamDb: when assembly has a reasonably small number of sequences (<1000), genome-wide queries could be internally broken down into per-seq queries; that would let us skip over chroms that precede minChrom. refs #6152 diff --git src/lib/annoGratorQuery.c src/lib/annoGratorQuery.c index b3a2ba5..4262c2f 100644 --- src/lib/annoGratorQuery.c +++ src/lib/annoGratorQuery.c @@ -64,31 +64,31 @@ void annoGratorQueryExecute(struct annoGratorQuery *query) /* For each annoRow from query->primarySource, invoke integrators and pass their annoRows * to formatters. */ { struct annoStreamer *primarySrc = query->primarySource; struct annoStreamRows *primaryData = annoStreamRowsNew(primarySrc); struct annoStreamRows *gratorData = NULL; int gratorCount = slCount(query->integrators); if (gratorCount > 0) { struct annoStreamer *gratorStreamList = (struct annoStreamer *)query->integrators; gratorData = annoStreamRowsNew(gratorStreamList); } struct annoRow *primaryRow = NULL; struct lm *lm = lmInit(0); -while ((primaryRow = primarySrc->nextRow(primarySrc, lm)) != NULL) +while ((primaryRow = primarySrc->nextRow(primarySrc, NULL, 0, lm)) != NULL) { if (primaryRow->rightJoinFail) continue; primaryData->rowList = primaryRow; boolean rjFilterFailed = FALSE; int i; for (i = 0; i < gratorCount; i++) { struct annoGrator *grator = (struct annoGrator *)gratorData[i].streamer; gratorData[i].rowList = grator->integrate(grator, primaryData, &rjFilterFailed, lm); if (rjFilterFailed) break; } struct annoFormatter *formatter = NULL;