BIg slowdown using Tweak tool -- sp-item.cpp
Hi, all. It looks like a change that occurred in rev. 15821 has caused some big performance issues when using the Tweak tool. In sp_item_update, this block of code is called with every update:
if (item->display && item->display->arenaitem) { NRRect item_bbox; sp_item_invoke_bbox(item, &item_bbox, NR::identity(), TRUE, SPItem::GEOMETRIC_BBOX); NR::MaybeNR::Rect i_bbox = item_bbox; nr_arena_item_set_item_bbox(item->display->arenaitem, i_bbox); }
and this is making the Tweak tool very slow to respond. Is there a better way of computing the SVG bounding box for the Arena item on an as-needed basis, rather than with every update? Also, I looked at other places that used item->display and that seems to be a linked list instead of just a single item.
Thanks,
John
The additions look reasonable in themselves, but the fact that almost everything worked fine without them suggests that this bbox calculation is really only needed in some special cases, and/or for some special objects (with filters and transforms perhaps?). Niko, can you please look into this to see if it's possible to limit the negative performance impact of these changes?
On 10/5/07, John Bintz <jcoswell@...1414...> wrote:
Hi, all. It looks like a change that occurred in rev. 15821 has caused some big performance issues when using the Tweak tool. In sp_item_update, this block of code is called with every update:
if (item->display && item->display->arenaitem) { NRRect item_bbox; sp_item_invoke_bbox(item, &item_bbox, NR::identity(), TRUE,
SPItem::GEOMETRIC_BBOX); NR::MaybeNR::Rect i_bbox = item_bbox; nr_arena_item_set_item_bbox(item->display->arenaitem, i_bbox); }
and this is making the Tweak tool very slow to respond. Is there a better way of computing the SVG bounding box for the Arena item on an as-needed basis, rather than with every update? Also, I looked at other places that used item->display and that seems to be a linked list instead of just a single item.
Thanks,
John
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Sun, 7 Oct 2007 19:43:34 -0300 "bulia byak" <buliabyak@...400...> kirjoitti:
The additions look reasonable in themselves, but the fact that almost everything worked fine without them suggests that this bbox calculation is really only needed in some special cases, and/or for some special objects (with filters and transforms perhaps?). Niko, can you please look into this to see if it's possible to limit the negative performance impact of these changes?
That code shouldn't affect anything besides filter rendering. Testing if the object has a filter applied would be the simplest thing to do in this case.
Another possibility might be to make that happen when the mouse is released. That could produce odd-looking results while modifying objects, though.
And for item->display being linked list... Yes, that propably should traverse the list and use nr_arena_item_set_item_bbox for every list node.
On 10/8/07, Niko Kiirala <niko@...1267...> wrote:
That code shouldn't affect anything besides filter rendering. Testing if the object has a filter applied would be the simplest thing to do in this case.
I like this idea. Please add this check.
Another possibility might be to make that happen when the mouse is released. That could produce odd-looking results while modifying objects, though.
No, objects can be transformed in millions of ways not involving a mouse at all.
bulia byak wrote:
On 10/8/07, Niko Kiirala <niko@...1267...> wrote:
That code shouldn't affect anything besides filter rendering. Testing if the object has a filter applied would be the simplest thing to do in this case.
I like this idea. Please add this check.
I just tested this change, and it worked great. Performance with the Tweak tool is just as fast as before the change. Thanks!
John
participants (3)
-
bulia byak
-
John Bintz
-
Niko Kiirala