ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: We are drawing palette icons using a loop which contains the following:
Our native PowerMacintosh version seems to draw these palettes slower than our 68K version running under emulation, which suggests a Mixed Mode Manager slowdown. All of the routines we call, however, are documented as native on the PowerMac. Here are some rough but representative timings: Timings on 8100/80 - 8 bit screen - System 7.5 microseconds percent of loop
Is it reasonable for Aren't all the Resource Manager calls native? These timings seem to indicate they are calling emulated routines. A: It is not really surprising that you're seeing these numbers, since the Resource Manager calls you are using are not native, and they generally call File Manager routines, which aren't native either. In a way, what you're asking is, which routines are native and which are not? Unfortunately, this is the wrong question: just because something is not native now doesn't mean it never will be. Designing your application based on assumptions you think are valid today is a dangerous thing to do, because your workaround won't necessarily continue to be faster in the future. Relying on the Resource Manager to be fast is generally not a good idea. Resource files slow down drastically once they reach a certain size (see the Toolbox Technote, "OV 8 Managerial Abuse"). Also, if the resource chain is long, you'll have problems. Since these are icons in a palette, you'll probably want to cache them somewhere, because you'll continually need them as you update your palette. One approach you can take is to load your icons in one of the first few
operations in your initialization code, just after calling Rather than using Finally, if you need to get at Icons for documents and applications, check out the MoreFiles sample. This is on the Developer CD Series as sample code. DTGetIcon is a useful utility for obtaining Icons. |
|