From: Christoph Egger Date: Mon, 25 May 2015 11:18:04 +0000 (+0200) Subject: Multiply stepsize by 3 X-Git-Tag: v0.2~10 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=84aeb915b20ba15ffef3371733b2a015c3bfc282;p=frida%2Ffrida.git Multiply stepsize by 3 As profiling show rather some time spent in that are, cut down number of iterations to one third. Shouldn't impact quality at all --- diff --git a/src/gui/widgets/CFGScene.cxx b/src/gui/widgets/CFGScene.cxx index aa27f2c..2c18c7b 100644 --- a/src/gui/widgets/CFGScene.cxx +++ b/src/gui/widgets/CFGScene.cxx @@ -88,12 +88,12 @@ void CFGScene::spaceWidgets() { if (NULL != next[0] && (next[0]->getEntry() - widget->getEntry()).y() > 0 && (next[0]->getEntry() - out).y() < 50) { - widget->moveBy(0, -1); + widget->moveBy(0, -3); changed = true; } else if (NULL != next[1] && (next[1]->getEntry() - widget->getEntry()).y() > 0 && (next[1]->getEntry() - out).y() < 50) { - widget->moveBy(0, -1); + widget->moveBy(0, -3); changed = true; } } @@ -113,10 +113,10 @@ void CFGScene::spaceWidgets() { itemrect.moveTo(item->scenePos()); while (relevantRect.intersects(itemrect)) { if (widget->scenePos().x() > item->scenePos().x()) { - widget->moveBy(1, 0); + widget->moveBy(3, 0); relevantRect.moveTo(widget->scenePos()); } else { - item->moveBy(1, 0); + item->moveBy(3, 0); itemrect.moveTo(item->scenePos()); } } diff --git a/src/gui/widgets/FunctionWidget.cxx b/src/gui/widgets/FunctionWidget.cxx index d717171..17b539f 100644 --- a/src/gui/widgets/FunctionWidget.cxx +++ b/src/gui/widgets/FunctionWidget.cxx @@ -38,7 +38,7 @@ FunctionWidget::FunctionWidget(Function* function, Mainwindow* mainwindow) std::map _blocks; local__add_basic_block(block, mainwindow, - manager, _blocks, scene, start_address, 100); + manager, _blocks, scene, 3*start_address, 100); QGraphicsView * view = new QGraphicsView(scene); view->setDragMode(QGraphicsView::ScrollHandDrag); @@ -77,7 +77,7 @@ namespace { scene->addItem(widget); widget->setFlag(QGraphicsItem::ItemIsMovable, true); - widget->moveBy(100*startx, block->getStartAddress() - starty); + widget->moveBy(100*startx, 3*block->getStartAddress() - starty); BasicBlockWidget *tmp, *nextl(NULL), *nextr(NULL); BasicBlock * tmpblock;