From 9ed337ebdfeff1528af7efb8fb0973170ed68200 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 10 Sep 2007 21:15:56 +0000 Subject: Inkscape becomes unusable when trying to snap to the path of a traced bitmap or a text paragraph. Make it usable again by not snapping to text longer than 240 chars or paths containing more than 500 nodes. Snapping to more than one of such objects will still be very slow. (bzr r3716) --- src/seltrans.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/seltrans.cpp') diff --git a/src/seltrans.cpp b/src/seltrans.cpp index d9566d091..c680e0cd3 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1521,11 +1521,20 @@ void Inkscape::SelTrans::moveTo(NR::Point const &xy, guint state) } else { + // Let's leave this timer code here for a while. I'll probably need it in the near future (Diederik van Lierop) + /* GTimeVal starttime; + GTimeVal endtime; + g_get_current_time(&starttime); */ + /* Snap to things with no constraint */ s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, it, dxy)); s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, it, dxy)); + + /*g_get_current_time(&endtime); + double elapsed = ((((double)endtime.tv_sec - starttime.tv_sec) * G_USEC_PER_SEC + (endtime.tv_usec - starttime.tv_usec))) / 1000.0; + std::cout << "Time spent snapping: " << elapsed << std::endl; */ } /* Pick one */ -- cgit v1.2.3