« Fun with Tabpanels | Home | Merry Christmas »

Plugin merge/split


One of the things I have to keep an eye on is the split of the plugins.
Making a plugin part has a certain overhead. We do have a minimum size for a plugin. On Windows 33 KB, on Mac OS X 12 KB per CPU architecture and 29 KB on Linux. But we also have common code which is used in several plugins.
So splitting a plugin part into two parts can reduce your application size if you only need one of the two parts. But if you use both, your size increases.

Today I change a few plugin parts inside the Cocoa plugin:

I merged NSGeometry, NSException, NSError and NSAutoreleasePool plugin parts into a NSBase plugin part. This are all basic Cocoa things so you properly have them anyway in your application if you use anything with Cocoa from my plugins. This plugin parts have 57 + 61 + 57 + 70 = 245 KB. But the combined part has only 86 KB, which saves 159 KB.

I also merged NSColorSpace and NSColor plugin parts. The NSColorMBS class has a Colorspace property and also the NSColorSpaceMBS class refers to the NSColorMBS class. So basicly once you use one of them in your app, you also have the other one. Here we have 147 + 74 combined to 164 KB which saves 57 KB.

Same for the NSView and NSWindow classes. Also NSResponder is the super class of NSView, so you have it always. Results in 123 KB saved for 225 + 127 + 168 adding to 397 KB.

All sizes are for universal plugins on Mac OS X (Intel+PPC code).
18 12 09 - 21:42
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.