I’ve backported most (i.e. the biggest gains) linker enhancements from xtouch into MonoTouch. Here’s some number from a sample application:
| Link All Assemblies | |||
| MonoTouch 4.0.x | MonoTouch (master) | diff | |
| KeyChain.exe | 4608 | 4608 | 0 |
| mscorlib.dll | 720896 | 571392 | 149504 |
| System.dll | 251904 | 0 | 251904 |
| System.Core.dll | 5632 | 0 | 5632 |
| Mono.Security.dll | 150351 | 0 | 150351 |
| monotouch.dll | 56320 | 54272 | 2048 |
| total | 1189711 | 630272 | 559439 |
| 100% | 53% | 47% | |
Of course this is an extreme case. Very small applications makes the best linker test cases. Larger applications will bring more code (hiding the linker results) so YMMV. Also the linker only works on managed code (the unmanaged driver application size, that includes mono, remains mostly unchanged) so the final application size won’t change that much.
Other stuff (plenty of ideas and a bit more code from xtouch) will have to wait after monospace and vacations
Pingback: Linker vs Backing Fields | surprisingly unimpressed