When building a NSImage from a icns file and then painting it on a ImageAndTextCell, it goes very slow. But if I create the NSImage from a png, jpg, etc. it paints very fast.
How to speed it up ? Creating a jpg (etc) from the icns ? Keeping a cache of the created NSImages ?
I appreciate your advise, thanks
Update (from comment below):
It seems as this is the code that is slowing down the execution when a icns file is loaded:
NSImage * image = [ [ [ NSImage alloc ] initWithContentsOfFile:
filename ] autorelease ];
called from: -
( id ) tableView : ( NSTableView * ) aTableView objectValueForTableColumn :
( NSTableColumn * ) aTableColumn row : ( NSInteger ) rowIndex
If I remove it, then the NSTableView painting is very fast. When it is not a icns file, but a jpg, png, etc. then the painting is very fast. Any hints ?