Review Request: Use QGraphicsScene::NoIndex instead of QGraphicsScene::BspTreeIndex (avoid Qt bug crashing amarok)

Daniel Faust hessijames at gmail.com
Sat Jul 16 14:41:24 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101966/
-----------------------------------------------------------

Review request for Amarok.


Summary
-------

As currently discussed in the amarok mailing list (http://mail.kde.org/pipermail/amarok/2011-July/032753.html) and in many bug reports, there's a Qt bug (http://bugreports.qt.nokia.com/browse/QTBUG-18021) that can lead to random crashes. If I got this right, it seems to be the second time that there's bug in Qt in the BspTreeIndex.
So a simple solution would be to just disable the index.


This addresses bugs 207382 and 269227.
    https://bugs.kde.org/show_bug.cgi?id=207382
    https://bugs.kde.org/show_bug.cgi?id=269227


Diffs
-----

  src/context/ContextView.cpp e90c262 

Diff: http://git.reviewboard.kde.org/r/101966/diff


Testing
-------

I'm using amarok this way for some weeks now and I couldn't see any downsides.
I haven't made a speed test but it feels equally fast.
Furthermore I don't know much about this, but according to the Qt documentation it doesn't seem that amarok would benefit much from this index since a lot of GraphicsObjects are created dynamically.

QGraphicsScene::BspTreeIndex:
A Binary Space Partitioning tree is applied. All QGraphicsScene's item location algorithms are of an order close to logarithmic complexity, by making use of binary search. Adding, moving and removing items is logarithmic. This approach is best for static scenes (i.e., scenes where most items do not move).
QGraphicsScene::NoIndex:
No index is applied. Item location is of linear complexity, as all items on the scene are searched. Adding, moving and removing items, however, is done in constant time. This approach is ideal for dynamic scenes, where many items are added, moved or removed continuously.


Thanks,

Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20110716/43e008fd/attachment.htm 


More information about the Amarok-devel mailing list