Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#1 closed Defect (fixed)

Displaying file icon in table view causes large CPU increase

Reported by: mark+transmission@… Owned by: somebody
Priority: Normal Milestone:
Component: Transmission Version:
Severity: Major Keywords:
Cc:

Description

In builds from SVN prior to [56] I was seeing around 8% CPU usage with a dozen or so torrents downloading. After updating today I noticed that Transmission was sitting at around 25% CPU. After investigating with Shark I noticed that a large amount of time was being spent inside -[NSImage drawAtPoint:fromRect:operation:fraction:] inside -[NameCell drawWithFrame:inView:]. This appears to be due to the images being drawn are autoreleased and thus end up being reallocated the next time the UI is drawn. This defeats NSImage's built in caching mechanisms and leads to substantially slower redraws.

An experiment in having NameCell maintain a cache of NSImage's keyed off the file path resulted in the CPU usage dropping back closer to previous levels. I will submit a patch based on this once I have a chance to clean it up.

Change History (1)

comment:1 Changed 13 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.