PDA

View Full Version : Performance problem for overlapped QGraphicsElements



santa
3rd August 2010, 12:50
Hi,

Wondering is there any performance optimization tricks for this problem:

I have more than 4000 Simple QGraphicsElements (Rects) in scene...I'm using minimal viewport update mode...permormance is fine when I'm moving any of the element through mouse(using default movable flag)...but what I'm experiencing here if thousand of elements are overlapping each other (same position), moving any other element on top of that area is very slow.

I have taken out all painting code from the all graphics element to check whether painting is the isuue or not. But still it is slow :confused:. Is it somthing to do with the way Qt/Scene process event and mainatain Z order? I have tried BSP and NoIndex both flag for scene but no luck :(

Is there any tricks to overcome this...thanks in advance

GreenScape
3rd August 2010, 20:14
no, there is no way to solve this. i have same problem. i wrote particle system, where particles are QGraphicsItems, but when i have > 500 partices(50fps) in scene there is cpu overhead. the problem is when you move(using move() method) any item, all items that intersect him are redrawn.