--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -734,6 +734,8 @@
//--------------------------------------------------------------------
+#define DIRECT_DOT_RUN 1
+
DotManager *DotManager::m_theInstance = 0;
DotManager *DotManager::instance()
@@ -750,6 +752,7 @@
m_dotRuns.setAutoDelete(TRUE);
m_dotMaps.setAutoDelete(TRUE);
m_queue = new DotRunnerQueue;
+#ifndef DIRECT_DOT_RUN
int i;
int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS"));
if (numThreads==0) numThreads = QMAX(1,QThread::idealThreadCount()+1);
@@ -767,6 +770,7 @@
}
}
ASSERT(m_workers.count()>0);
+#endif
}
DotManager::~DotManager()
@@ -834,11 +838,17 @@
portable_sysTimerStart();
// fill work queue with dot operations
DotRunner *dr;
+ int prev=1;
for (li.toFirst();(dr=li.current());++li)
{
+#ifdef DIRECT_DOT_RUN
+ msg("Running dot for graph %d/%d\n",prev,numDotRuns);
+ if(!dr->run()) return FALSE;
+ prev++;
+ };
+#else
m_queue->enqueue(dr);
}
- int prev=1;
// wait for the queue to become empty
while ((i=m_queue->count())>0)
{
@@ -865,6 +875,7 @@
{
m_workers.at(i)->wait();
}
+#endif
portable_sysTimerStop();
if (setPath)
{