mostlylucid

scott galloway's personal blog...
posts - 916, comments - 758, trackbacks - 11

My Links

News

Archives

Post Categories

Misc. Coding

Performance

Obsessive Coding, optimal string Reverse...

I love this type of thing, a whole post on optimal string reverse algorithms. I always love this sort of thing, learning huge amounts of detail about fundamental operations (sort of, umm when do you ever reverse strings?). Actually looking at Justin Rogers' blog he has lots of great performance posts...

posted @ Monday, February 04, 2008 9:00 AM | Feedback (1) | Filed Under [ .NET Performance ]

Why do so many people mess up Singletons?

I've written about this a few times now (use the search thingy to find where) but I'm still surprised how many people mess up the Singleton pattern.   For instance take: if (blogSettingsSingleton == null)                 {                     blogSettingsSingleton = new BlogSettings();                 }                 return blogSettingsSingleton;   Looks ok, right? But this is a classic poor pattern when dealing with multi-threaded apps. Why? Look at the initial 'if' statement, and think what happens if multiple treads hit this at the same time...one thread...

posted @ Sunday, January 27, 2008 4:47 PM | Feedback (0) | Filed Under [ .NET Code Snippets Patterns Performance ]

Really nice article on .NET Data Access

Steven Smith has a great little article on ASPAllicance on comparing performance and methods of performing data access in .NET applications. Some really interesting techniques there, I especially like the IDataReader delegate example, a really nice solution to passing IDataReaders between layers in an app...

posted @ Thursday, April 07, 2005 10:37 AM | Feedback (0) | Filed Under [ .NET Performance ]

Nested repeaters - new article on Codeproject and why you shouldn't do it that way!

Just been reading this article on Codeproject.com...hmm...I have a few issues with how he does things:DataBinder.Eval - I have what is becoming an obsession about this now - there's just NO NEED for this in most cases, it sucks in terms of performance (you can typically lose about 20% compared to the stongly typed method. I've posted a couple of times about this here and here.OnItemDataBound - now, I've yet to do a benchmark comparing to member methods (just reminded myself actually, I might do one this weekend). I use to use this method all the time for nested repeaters...

posted @ Saturday, February 21, 2004 11:15 AM | Feedback (2) | Filed Under [ ASP.NET Performance ]

Web Service Compression - really nice implementation of a Web Service Extension (with sample)

I've posted about this topic a few times, it's really nice to see that someone has finally given a practical, free method of doing this. This implementation uses WS-E to do this, meaning that you add an attirbute to both the client and server portions of your web service - and there you have it, a compressed SOAP message!If you're using Web Services and transmitting any non-trivial amount of Data, I really do recommend that you use compression on the SOAP message (especially if you're sending DataSets, those buggers are huge when serialized - of course you can minimize them in...

posted @ Saturday, January 24, 2004 2:32 PM | Feedback (0) | Filed Under [ .NET Performance ]

Another article in the offing...hopefully...if I get round to it...Member methods versus OnItemDataBound for nested Data List controls

A very common question in the ASP.NET Forumsis "How do I nest one Repeater (or DataList or DataGrid) inside of another?"; well, my usual stock answer used to be to use the OnItemDataBound event then use a FindControl() to find the Repeater inside the template and set it's datasource to the child view - then just DataBind...Recently though, I've gone against this - based in part on a bit in a book by Farhan Muhammad and Matt Milner (can't find the link to the exact book, but this one is pretty useful too), essentially, it involves using a member method....

posted @ Thursday, January 22, 2004 11:19 AM | Feedback (0) | Filed Under [ ASP.NET Performance ]

More on my Load Testing fun...

Well, still at it (20 hours after starting - yes, the time on this post is correct!). Really fustrating mostly, but one of those times coding where hours and hours of pain (literally in this case - flu and splitting headaches were involved) were followed by a sudden dawning then a solution.Well, I've learnt more about Load Testing and SQL Server performance today than I had in the previous 2 years, lessons I've learnt:SQL Profiler is god's own tool (not in any nasty sordid way, in a good way) - use it, love it! If you're running a load test,...

posted @ Wednesday, January 21, 2004 1:57 AM | Feedback (0) | Filed Under [ ASP.NET Performance ]

Powered by: