Commit 246130d9 authored by Milian Wolff's avatar Milian Wolff
Browse files

Optimize: Disable semi-expensive debug output generation.

This debug message was never used, but still constructed on every
paint event. Getting rid of it makes this a bit faster.

CCBUG: 307632
parent f3dd599b
......@@ -37,6 +37,13 @@
#include <klocale.h>
#include <KAction>
// comment out to get extended debug output during rendering
// #define RENDER_DEBUG 1
#ifndef RENDER_DEBUG
#define RENDER_DEBUG 0
#endif
namespace KGraphViewer
{
......@@ -162,15 +169,17 @@ void CanvasElement::computeBoundingRect()
it = element()->renderOperations().constBegin(); it_end = element()->renderOperations().constEnd();
for (; it != it_end; it++)
{
// QString msg;
// QTextStream dd(&msg);
// dd << element()->id() << " an op: " << (*it).renderop << " ";
// foreach (int i, (*it).integers)
// {
// dd << i << " ";
// }
// dd << (*it).str;
// kDebug() << msg;
#if RENDER_DEBUG
QString msg;
QTextStream dd(&msg);
dd << element()->id() << " an op: " << (*it).renderop << " ";
foreach (int i, (*it).integers)
{
dd << i << " ";
}
dd << (*it).str;
kDebug() << msg;
#endif
if ((*it).renderop == "e" || (*it).renderop == "E")
{
......@@ -224,7 +233,8 @@ QWidget *widget)
{
widthScaleFactor = 1;
}
#if RENDER_DEBUG
QString msg;
QTextStream dd(&msg);
foreach (const DotRenderOp &op, element()->renderOperations())
......@@ -236,7 +246,8 @@ QWidget *widget)
}
dd << op.str << endl;
}
// kDebug() << msg;
kDebug() << msg;
#endif
if (element()->renderOperations().isEmpty() && m_view->isReadWrite())
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment