diff --git a/thorlcr/activities/thactivityutil.cpp b/thorlcr/activities/thactivityutil.cpp index a12336860cc..f6acb6568ea 100644 --- a/thorlcr/activities/thactivityutil.cpp +++ b/thorlcr/activities/thactivityutil.cpp @@ -120,21 +120,22 @@ class CRowStreamLookAhead : public CSimpleInterfaceOf while (requiredLeft&&running) { OwnedConstThorRow row; + bool eog = false; { LookAheadTimer timer(activity.getActivityTimerAccumulator(), activity.queryTimeActivities()); row.setown(inputStream->nextRow()); - } - if (!row) - { + if (!row) { - LookAheadTimer timer(activity.getActivityTimerAccumulator(), activity.queryTimeActivities()); row.setown(inputStream->nextRow()); + if (!row) + break; + eog = true; } - if (!row) - break; - else - writer->putRow(NULL); // eog } + + if (unlikely(eog)) + writer->putRow(NULL); + ++count; writer->putRow(row.getClear()); if (requiredLeft!=RCUNBOUND) diff --git a/thorlcr/graph/thgraphslave.cpp b/thorlcr/graph/thgraphslave.cpp index d0c87d8e7f0..4c8065b555c 100644 --- a/thorlcr/graph/thgraphslave.cpp +++ b/thorlcr/graph/thgraphslave.cpp @@ -593,7 +593,7 @@ unsigned __int64 CSlaveActivity::queryLocalCycles() const const unsigned __int64 blockedCycles = queryBlockedCycles(); if (processCycles < blockedCycles) { - IWARNLOG("CSlaveActivity::queryLocalCycles - processCycles %" I64F "u < blockedCycles %" I64F "u", processCycles, blockedCycles); + ActPrintLog("CSlaveActivity::queryLocalCycles - process %" I64F "uns < blocked %" I64F "uns", cycle_to_nanosec(processCycles), cycle_to_nanosec(blockedCycles)); return 0; } return processCycles-blockedCycles;