Contents tagged with Performance
-
Using TPL and PLINQ to raise performance of feed aggregator
In this posting I will show you how to use Task Parallel Library (TPL) and PLINQ features to boost performance of simple RSS-feed aggregator. I will use here only very basic .NET classes that almost every developer starts from when learning parallel programming. Of course, we will also measure how every optimization affects performance of feed aggregator.
-
ASP.NET MVC 3: Using global action filters to find out running time of controller actions
Lately I blogged about global action filters in ASP.NET MVC 3. Yesterday I found cool article from Nick Berardi’s Coder Journal where he introduces how to use action filters to measure running time of ASP.NET MVC controllers. And here is my experiment – how to use global action filters to find out how long controller actions are running. You just need couple of lines of code.
-
SQL Server: How to insert million numbers to table fast?
Yesterday I attended at local community evening where one of the most famous Estonian MVPs – Henn Sarv – spoke about SQL Server queries and performance. During this session we saw very cool demos and in this posting I will introduce you my favorite one – how to insert million numbers to table.
-
Unity, Castle Windsor, StructureMap, Ninject – who has best performance?
I made quick comparison of performance of four DI/IoC containers. I measured Unity, Castle Windsor, StructureMap and Ninject in two scenarios – resolving objects with empty constructor and resolving object with injected parameters in its constructor. Results are here.
-
Using timer based Unit of Work and Command classes to measure repositories performance
In my last post Find out how long your method runs I introduced how to measure the speed of code using actions. In this posting I will make a step further and give you some ideas about how to create easily measurable code units and how to build measurable scenarios of them. As a foundation I use simplified versions of patterns like Command and Unit of Work.
-
Find out how long your method runs
I am making some experiments with large database and different O/R-mappers. To make it easier for me to measure the time that code takes to run I wrote simple command class that uses Stopwatch class and measures how long it takes for action to run. I this posting I will show you my class and explain how to use it.
-
Experiment: List<T> internals and performance when adding new elements
Lists and their performance has been hot discussion topic for years. I have seen many examples and read a lot of stories about List class and I made conclusion that there is too much pointless opinions about it. In this posting I will show you how List<T> performs when adding elements to it and how it works internally. Be prepared for interesting discussion!
-
Common mistakes made when measuring the speed of code
During times I have seen problematic ways how developers measure the speed and performance of their code. There are some easy tricks that help you make your measurements way better and accurate comparing to measurements made not so well. In this posting I will give you some hints how to get more accurate results when measuring the speed of your code.
-
Measuring ASP.NET and SharePoint output cache
During ASP.NET output caching week in my local blog I wrote about how to measure ASP.NET output cache. As my posting was based on real work and real-life results then I thought that this posting is maybe interesting to you too. So here you can read what I did, how I did and what was the result.
-
How to avoid the exception “Substitution controls cannot be used in cached User Controls or cached Master Pages.”
Recently I wrote example about using user controls with donut caching. Because cache substitutions are not allowed inside partially cached controls you may get the error Substitution controls cannot be used in cached User Controls or cached Master Pages when breaking this rule. In this posting I will introduce some strategies that help to avoid this error.