[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[NSImage imagedNamed:] and application startup tuning
From: |
Michael Hanni |
Subject: |
[NSImage imagedNamed:] and application startup tuning |
Date: |
Mon, 17 Mar 2003 22:44:11 -0800 (PST) |
Hi,
[NSImage imageNamed:] provides a very easy way to grab images. You can simply
provide a name, minus even an extension, and NSImage will find your image.
However, this can be more intensive than required when you already know your
image's extension. For example, when you strace a gnustep app right now there
are hundreds of attempts to find images -- this method loops through every
possible directory with every possible image extension until it finds the right
one -- used in the AppKit. The time involved is not huge, but it is entirely
unnecessary I think. With the attached patch I've added a '.tiff' extention to
most images loaded in the AppKit.
2003-03-17 Michael Hanni <michael@deviant-behavior.com>
* Source/NSApplication: added .tiff to images we grab off the disk
to help streamline the loading process.
* Source/NSBrowserCell.m: ditto
* Source/NSButtonCell.m: ditto
* Source/NSMenuItemCell.m: ditto
* Source/NSMenuItem.m: ditto
* Source/NSPopUpButtonCell.m: ditto
* Source/NSScroller.m: ditto
* Source/NSWindow.m: ditto
Cheers,
Michael
tiff.change.diff
Description: tiff.change.diff
- [NSImage imagedNamed:] and application startup tuning,
Michael Hanni <=