[HOWTO] - Speed up finder on systems with little RAM

Makosuke

Guy Who Loves X
There's a very interesting thread in the MacNN forums in which "moki" (Andrew Welch--president of Ambrosia) explains how to turn on a feature in 10.1 that isn't by default--automatic background compression of window memory:

http://newforums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=46&t=000100

Even if it doesn't do anything, it's got a geek coolness to it. To paraphrase, as I understand it: According to him (and he should know) this basically allows X to compress the memory used to store the visual contents of windows (we're talking about display graphics, not files) when they're not updated for a while (a finder window in the background, for example). Since X windows suck up a lot of RAM (>1MB each for large ones), and the compression is around 10X, you can significantly decrease the amount of RAM your system uses if you routinely leave a bunch of windows open. On systems without a massive amount of RAM (or those with a massive number of windows open) this can add up to more free RAM available for apps (on the order of dozens of MBs) and less paging. He also says (and I repeat that he should know) that due to the way the processor passes things around, this ammounts to, if anything, a speed gain--in any case, no speed loss.

According to some replies in that thread, it definitely saves RAM, and may make a perceptible speed difference on systems without a whole bunch of memory (although I haven't noticed anything either way on a G3 266 w/192MB system). There was only one report of problems--graphics glitches in Java apps--associated with it. All you have to do is modify everybody's favorite, a plist file. I'd recommend checking the thread out yourself, but to roughly repeat his instructions (hope nobody minds...):


Begin How-to instructions here:

Open the com.apple.windowserver.plist file in /library/preferences as root

(for example, using terminal and the pico text editor by typing: sudo pico /library/preferences/com.apple.windowserver.plist)

Then find the first <dict> tag in the file (it's a few lines down from the top), and past the following text directly below it:

<key>BackingCompression</key>
<dict>
<key>compressionScanTime</key>
<real>5.000000000000000e+00</real>
<key>minCompressableSize</key>
<integer>8193</integer>
<key>minCompressionRatio</key>
<real>1.100000023841858e+00</real>
</dict>

save the changes, then logout and back in. It should have worked.

You can check if you have developer tools installed by opening the QuartzDebug app and clicking Show window list. Windows that are compressed should have a "C" next to their buffer size.

Again, I recommend checking the thread out (and giving at least silent praise to moki for letting the world know about it), but good luck with it!
 
Excellent! This is a great tip.

Too bad defaults can't write to this file...that would make thing easier. Ah well.
 
Heh, you wanna post a howto on running emacs? I've been using it for the past 3 years, and I still have problems with it every now and then. I tell people to use pico in posts I do because I definitely don't wanna explain how to use emacs. :p
 
(Actually, scope, the first thing I mentioned was that it was by Andrew Welch--I don't know him, but he's a cool fellow.)

I wanted to add that there's now a little freeware program that'll do the same thing if you don't feel like messing 'round with Terminal. Well, it's not nearly as little as it could have been (~800K), but it should get the job done anyway.

The VersionTracker listing: http://www.versiontracker.com/moreinfo.fcgi?id=12247&db=macosx

You might also note the problems that at least one person had with 3D apps in the comments section...
 
Dear Scope,

I edit the file "com.apple.windowserver.plist" which is located in /Library/Preferences as below (attached codes), but when I use QuartzDebug app to check it, no "C" next to the buffer size. Do I have done something wrong? Edited codes are posted below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>BackingCompression</key>
<dict>
<key>compressionScanTime</key>
<real>5.000000000000000e+00</real>
<key>minCompressableSize</key>
<integer>8193</integer>
<key>minCompressionRatio</key>
<real>1.100000023841858e+00</real>
</dict>


<key>CGSInterocitorSelectMode</key>
<integer>0</integer>
<key>DisplaySets</key>
<array>
<array>
<dict>
<key>Active</key>
<integer>1</integer>
<key>Depth</key>
<integer>4</integer>
<key>DisplayProductID</key>
<integer>39949</integer>
<key>DisplaySerialNumber</key>
<integer>0</integer>
<key>DisplayVendorID</key>
<integer>1552</integer>
<key>Height</key>
<integer>768</integer>
<key>IODisplayLocation</key>
<string>IOService:/MacRISC2PE/ATY,RageM3p12A/.Display_Rage12
8/display0/AppleDDCDisplay</string>
<key>Mode</key>
<integer>17</integer>
<key>OriginX</key>
<integer>0</integer>
<key>OriginY</key>
<integer>0</integer>
<key>Unit</key>
<integer>0</integer>
<key>Width</key>
<integer>1152</integer>
</dict>
</array>
</array>
<key>ProcessName</key>
<string>WindowServer</string>
<key>ProcessSerialNumber</key>
<string>00000000-00000000</string>
</dict>
</plist>
 
mine looks like this

?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>BackingCompression</key>
<dict>
<key>compressionScanTime</key>
<real>5.000000000000000e+00</real>
<key>minCompressableSize</key>
<integer>8193</integer>
<key>minCompressionRation</key>
<real>1.100000023841858e+00</real>
</dict>

<key>CGSInterocitorSelectMode</key>
<integer>0</integer>
<key>DisplayLayoutToRight</key>
<false/>
<key>DisplaySets</key>
<array>
<array>
<dict>
<key>Active</key>
<integer>1</integer>
<key>Depth</key>
<integer>4</integer>

And then some more...
 
Back
Top