$bbtitle
Apple Stock: 199.92 ( -0.59 )
RSS RSS Twitter Twitter
Search:
AppleInsider.com Archives News Bytes Reviews Anonymous Mailer Submit Story AppleInsider Forums Mac Prices Polls Advertise on AppleInsider Contact AppleInsider
Save up to $280 on new MacBook Pros and up to $165 on brand new iMacs with special coupons: Mac Pricing Guide updated Nov 20th (Find the best prices on Macs).
Friday, June 27, 2008

Solving the mystery of Snow Leopard's shrinking apps

By Prince McLean

Published: 12:50 PM EST

In response to a report earlier this week pointing out that many of the applications in early builds of Mac OS X 10.6 Snow Leopard are dramatically smaller in size, a number of developers have weighed in to explain where all those missing megabytes went.

Bryce C noted that the extra heft in Leopard's apps does indeed come from localization files, which are used to distill all of the text strings and other variables that differ between languages. Depending on the language preference set by the user, the operating system accesses the desired language files and uses them in conjunction with the common application code to simplify developers' work to deploy their apps to worldwide markets.

Inside each application's bundle file in Mac OS X are NIB files, shorthand for the original name of the tool used to create them: NeXTSTEP Interface Builder. NIB files also contain any graphical resources used by the application.

During development, Interface Builder is used to visually arrange the program's interface controls -- from buttons to scroll lists -- which are then mapped to actions. The original XML files used during development are named "designable.nib," but these files are not supposed to ship with the finished application. The final NIB files that are included with the finalized application are much smaller, and can usually be compressed even further.

Running these NIB files through a simple file compression results in dramatic disk savings. Bryce noted that the XML and HTML files stored within the bundle of Leopard's Mail shrink from 289 MB to 96.6 MB with a simple file compression, resulting in a file size comparable to the new Mail delivered in the Snow Leopard beta release.

Apple earlier applied a similar technique to preference .plist files, converting them from plain human readable XML text files into compressed binaries to save space on disk. The added overhead required to compress and uncompress these files in the background as they are read from and written back to disk is insignificant.

While Apple may likely be expanding the use of background file compression to save space in Snow Leopard, today's Mac OS X Leopard is unnecessarily overweight due to an error Apple made when packaging the system, according to a developer who asked to remain anonymous. Leopard apps all contain superfluous designable.nib files that should have been removed in the Golden Master. "Mail alone has around 1400 of these files, taking up almost 200 MB of disk space," he noted.

Snow Leopard App Sizes


Other suspected reasons for the dramatic weight reduction included lighter weight, resolution independent vector graphics and the removal of PowerPC code. However, the same developer explained that "most of the artwork in the applications is the same as it was in Leopard. Snow Leopard is, sadly, not much further along in resolution independence than Leopard, at least in the developer preview."

The move to vector graphics may make a small additional impact on tightening up the system, and even graphical interface elements stored as bitmapped art will benefit from the file compression noted above. As for the removal of PowerPC code, developers note that Snow Leopard's applications are still currently being delivered as Universal Binaries anyway, and that removal of that extra code has a very limited impact on file size when compared to the results of compressing large XML and graphics files related to interface localization and the complete removal of any unnecessary development NIB files.

Leopard users tight on disk space can safely delete all of the designable.nib files stored within their apps and use a tool such as Monolingual or Northern Softworks Leopard Cache Cleaner to remove unused foreign language files, resulting in a free weight reduction without the wait.

Filed under : Mac OS X 71 Comments ] 
Story topics: Mac OS X 10.6   Print ] [ Story Link ] 


Download Parallels 5.0 Today
Mac Poker players can play Full Tilt Poker for Mac and get 100% to $600 free with bonus code MP600, courtesy of Online Poker Mac
AppleInsider Features
Hot Forum Topics

Recent Articles
Apple's App Store approval process gets partially automated
TomTom to release iPod touch-specific GPS car kit
China Unicom expects 10% of 3G users on iPhone in 3 years
Steve Jobs e-mails terse response to upset Apple developer
Hack re-enables Atom processor compatibility for Mac OS X 10.6.2
Microsoft shareholders grill CEO about Apple, iPhone
Google outlines Chrome OS plans for netbooks
Sony announces iTunes competitor for music, movies, books
Apple investigates space-age fitness tracking technology
Web search statistics show Bing stagnant, Google growing
New apps said to make iPod touch more prominent in Apple stores
Piper: Apple tablet no more than $700, launch timing irrelevant
Major publisher preps for Apple tablet as delay, OLED rumors surface
AT&T faces setback in legal battle over Verizon ads [u]
TomTom app updated to support iPod touch, first-gen iPhone
Oct. estimates suggest Apple will sell 2.9M Macs this quarter
Microsoft retail store gets odd viral marketing buzz
Rumored 'Google Phone' said to be coming in 2010
Evidence suggests Apple at work on Mac OS X 10.7
iPhone approved in South Korea; China Mobile talks continue
AT&T upgrades network as wireless traffic quadruples over past year
Apple store in upscale Greenwich, Conn., to open Saturday
Needham downgrades Apple stock on technicality
Verizon rumored to embrace Palm in 2010 to combat iPhone
Apple's iPhone App Store takes off in China
Belgian heist lands thousands of stolen Apple iPhones
Verizon responds to AT&T in court: 'The truth hurts'
Apple said to release iPhone app for in-store appointments
OnLive cloud gaming service demonstrated on Apple's iPhone
Apple tablet speculation: high-end graphics, several models
Microsoft looks to combat Apple globally with Zune content
Apple met with AdMob weeks before acquisition by Google
Apple earns key legal victory against Psystar
Apple looks to hire AAA game developer for in-house iPhone team
Apple's next-gen iPhone power amp; NASA chemical sensor app
Bill Gates praises Steve Jobs for saving Apple
AT&T responds to 'false and misleading' Verizon ads
Apple unveils browser-based iTunes Preview
AT&T asks court to pull Verizon's 'misleading' iPhone ads
Conflicting reports within Qualcomm suggest Verizon-only iPhone

AppleInsider Market Place

Sell your Laptop - working or not. Free shipping.: Get an instant online quote and sell your laptop today !

Believe in Office: Save Up To 25% on Office 2004 For Mac. Visit Our Site for Details!

IBackup - SMB Online Backup: IBackup is the preferred online storage and backup service of choice for SMBs for its ease of use, security and value. Offers automated backup and restore, file selection and securiy.

Download free software - everyday updated freeware files

 
Advertisements








AppleInsider RSS Feed
AppleInsider © 1997-2008
Please review our Privacy Policy.
Written/Edited/Compiled by the AppleInsider Staff.