Last time I wrote Shuffle and TakeRandom extension methods for IEnumerable<T> which use the Fisher-Yates algorithm to perform an unbiased shuffle of a sequence and take a random subset from it. In order to optimise the performance of the TakeRandom method I had to reverse the documented implementation...
It's a fairly common practice on web sites to display sets of randomly ordered items, whether it's a selection of your friends, items related to the one you're looking at, or even something as simple as a tag cloud. Sometimes the entire set of items is randomised, and sometimes you want to...
One of the things that web sites tend to do frequently is look up the country a user is from based on their IP address, for example to direct them to the appropriate site for their country or to restrict content that cannot be legally shown to them. There are numerous solutions to perform this mapping...
Databases cause two performance problems for applications. Firstly they are difficult to scale out compared to other server roles which means they can easily become the scalability bottleneck, and secondly they are on a remote machine which means that each query made to them involves network latency...
Until now blinkBox has been using the ASP.NET in-process cache to handle all of our caching requirements, and it works very well for smaller sites, but as the number of users on the site increases it's rapidly becoming too small to hold all the data we want to keep cached. What we need is a distributed...
The most important performance factor in a BizTalk environment is the SAN and the way it is configured. I’ve tuned a few enterprise BizTalk systems and in most cases the ultimate (and usually unsolvable by this time) bottleneck has been the disk write queue length on the database disk volume(s). Using...
I'm sick of the static vs instance methods argument based on performance. Performance has nothing to do with it. You should make your methods either static or instance depending on the way the method is used and what is more intuitive to the user of the class. Even Microsoft are guilty of pushing...
Custom performance counters are great for monitoring your system's performance in key areas... they're also good for monitoring the performance of systems you're calling into so that if you miss Service Level Agreements (SLAs) you've got the proof that it's not your code at fault...