 |
 |
optimizing code size
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2004
Status:
Offline
|
|
maybe it's just me, but code size on things I've written seems really huge... not in terms of the objective-c code, but the compiled app: for example, the executable for apple's TextEdit is about 112KB here, but apps that I've written that are similar, but do much much less come in around 1MB for the executable size.
What's going on? is apple getting away with more by using carbon? or is it just that they have a couple tricks up their sleeves that they don't want to share?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
statically linking versus dynamic linking?
poor coding? (no offense, it's a legitimate cause for large executables).
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2004
Status:
Offline
|
|
poor coding? nah... see, cause apple includes the source code for text edit in the dev tools (10.2, not Xcode) that I'm using, and compiling it results in a application package aroud 2.2 MB in size (the shipped TextEdit is 684kB or so)
what's the difference between static and dynamic linking? which is better for code size? how do I set things up to use that option?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by arcticmac:
poor coding? nah... see, cause apple includes the source code for text edit in the dev tools (10.2, not Xcode) that I'm using, and compiling it results in a application package aroud 2.2 MB in size (the shipped TextEdit is 684kB or so)
what's the difference between static and dynamic linking? which is better for code size? how do I set things up to use that option?
You have debugging code in yours. If your build target a "development build" or a "deployment build."?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
yeah, you can either run "strip" on the executable file or set it to deployment mode.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2002
Status:
Offline
|
|
You should use Deployment style AND strip.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Originally posted by arekkusu:
You should use Deployment style AND strip.
In XCode doesn't deployment strip the executable? I know there's an option to.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Apr 2004
Status:
Offline
|
|
thanks, that's much better... just as a side note though, I couldn't tell that strip made any difference, but having projectbuilder not generate debug symbols and setting it in deploy mode worked great.
thanks again!
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|