Re: Xcode 4.3.1 memory usage
Re: Xcode 4.3.1 memory usage
- Subject: Re: Xcode 4.3.1 memory usage
- From: email@hidden
- Date: Mon, 19 Mar 2012 13:57:23 +0000
On 16 Mar 2012, at 23:02, Jens Alfke wrote: That source file contains a pathologically long method named -fillMatrix:withObject:. It’s over 3000 lines long! Huge functions like this have always presented problems for code optimizers — I’m not an expert on compiler techniques, but I believe there are data structures and algorithms used in optimization that tend to grow as at least O(n^2) with the number of basic blocks or branches in the function being optimized.
I refactored the monster function using a helper object and saw massive improvements. The file now compiles in 20secs and uses 250MB ram which greatly improves the build performance for my app as a whole.
I typically like to include third party frameworks as sub projects within my app project rather than just using the framework binary. This naturally gives longer builds following a clean but it also makes it easier to say on top of issues as APIs and tool chains evolve.
The refactored class is here:
Regards
Jonathan Mitchell Mugginsoft LLP
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden