Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3393 closed Bug (fixed)

SqueezeLabel implementation eats cpu

Reported by: Longinus00 Owned by: charles
Priority: Normal Milestone: 2.02
Component: Qt Client Version: 2.01
Severity: Major Keywords:
Cc:

Description

Currently SqueezeLabel? plays tricks with setText to show an elided version of a string when a paintEvent fires. Unfortunately, this causes another paintEvent to fire and quickly causes a cascade of paintEvents, eating all available cycles. Luckily the drawing routine is only single threaded.

Attachments (1)

fewer-squeeze.diff (2.4 KB) - added by charles 13 years ago.
use Squeeze Label in fewer places

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by charles

Most of the places where we're using the squeeze label don't really need it. It's used in 15 places, but mostly just for consistency. The only three places IMO where it would be helpful are origin, location, and error.

This doesn't resolve the code problem in squeeze label, but it does remove 80% of the squeeze labels.

Changed 13 years ago by charles

use Squeeze Label in fewer places

comment:2 Changed 13 years ago by charles

This issue was filed upstream over a year ago: http://bugreports.qt.nokia.com/browse/QTBUG-3502

comment:3 Changed 13 years ago by charles

well, forget about fewer-squeeze.diff. It looks like even one squeeze label is enough to peg the CPU.

comment:4 Changed 13 years ago by charles

  • Owner changed from Longinus00 to charles
  • Status changed from new to assigned

fixed in trunk by r10943

fixed in the 2.0x branch by r10944

comment:5 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:6 Changed 13 years ago by charles

  • Component changed from Transmission to Qt Client

comment:7 Changed 13 years ago by charles

I don't think this fix is sufficiently generic to feed upstream. It assumes the only thing in the label is text... it doesn't handle images / movies etc.

Note: See TracTickets for help on using tickets.