22 to 0.3 seconds!
I found a simple solution to a very common problem. While profiling I found that remove in this little method took a lot of the time.
public void MovePropertyFirst(IProperty property)
{
properties.Remove(property);
properties.Insert(0, property);
}
The reason [...]
Performance nightmare
March 5th, 2010 by Björn Carlsson — .Net, Tips & Tricks
Tags: performance, programming
Learn to Stop Worrying and Love the Singleton
January 15th, 2010 by Fredrik Olsson — Android, Architecture, Embedded, Java, Tips & Tricks
Enterprise applications and mobile applications have quite different requirements. Starting an enterprise application is just something you do once before it continue running for months or years. On the other side of the spectrum most mobile applications seldom runs for more than minutes, run by a bored users standing in line or riding the bus. [...]
Tags: design patterns, java me, mobile, mock, performance, spring ldap
Queued Background Tasks for Cocoa
May 9th, 2009 by Fredrik Olsson — Architecture, Java
The megahertz race is over, and instead we get more execution cores. This means that we as developers must make our applications parallel, in order to take advantage of the new performance. The easiest way to be parallel is to execute tasks in new threads, something that is useful also for lengthy but not resource [...]
Tags: concurrency, design patterns, frameworks, iphone, mac, mobile, network, objective-c, open source, performance, programming
Regular Expressions and Cocoa
May 6th, 2009 by Fredrik Olsson — Cocoa, Embedded, Tips & Tricks
Regular expressions is a powerful tool for solving many problems related to text. It can be misused as any good tool, but there are moments when they are the best solution for a given problem. At those moments the lack of regular expressions for Cocoa on Mac OS X and Cocoa Touch on iPhone OS [...]
Tags: apple, frameworks, iphone, mac, mobile, objective-c, open source, performance, programming, regex
Adding Sorted Inserts to Cocoa Arrays
March 28th, 2009 by Fredrik Olsson — Architecture, Cocoa, Embedded, Tips & Tricks
NSArray and NSMutableArray have methods for sorting arrays, NSArray returns new sorted arrays and NSMutableArray can be sorted in place. The sort methods comes in three flavours; using a function, using a selector, or using an array of NSSortDescriptor objects.
NSArray admits to sorts being a slow operation, and adds a method pair for comultive sorts [...]
Tags: frameworks, iphone, mobile, objective-c, open source, performance, programming
Squid, the caching proxy
June 6th, 2008 by Ulrik Sandberg — Tips & Tricks
I just checked out the old Squid again, the worlds most famous caching proxy. If you direct all your web access through the Squid proxy server, it will cache stuff after the first access. This would simplify for example for labs where fifty people simultaneously begin retrieving stuff from a Maven repo somewhere or downloading [...]
