Monthly Archives: February 2010

4 hours optimizing later…

After just 4 hours of dedicated optimizations with the aid of the EQATEC profiler for Silverlight – I managed to speed up the rendering pipeline of Balder quite dramatically. The profiler has a great comparison feature – simple and straight to the point. It shows that the rendering pipeline for Balder got optimized at an average og 2.28 times. (RenderingManagerRender) :

Comparison

First go with the EQATEC Silverlight Profiler

Its been a little more than 24 hours since I started playing with the EQATEC profiler and have identified bottlenecks in Balder that is close to impossible to discover without a profiler. One of things I really liked about the EQATEC profiler was its really easy to use user interface, its super-intuitive and I got up and running in seconds and could drill down straight to the bottlenecks just as fast. What impresses me with the profiler is the speed of it, I've worked with quite a few profilers in the past for the desktop – and they have always surprised me in a negative way with the amount of memory they use and not to mention the enourmous datafiles they generate. EQATECs just feels right, kudos to Richard Flamsholt and his team in Denmark for this product. You can download a free/personal license from here.

I thought I just give a quick guide into how its used.

The profiler is not integrated in Visual Studio and does not need to instrument your assemblies during compiletime, it works on the binary output of your compiled output. After starting the profiler, you need to point the profiler to your output directory in which the binaries for your application resides, typically the bindebug directory in your Visual Studio project folder. Click the browse button as shown below:

The first time you run it and if you have 3rd party assemblies that are signed you'll be asked to include or exclude these – the default recommendation is to exclude these. There is a resigning option included as well, but I didn't need this so I just skipped them. After it completes gathering your assemblies and recognizes the Silverlight app by finding the testpage and everything, you can go ahead and click the Build button in the lower right corner. It will instrument your binaries and add hooks for all your methods.

Then you just simply click the "Run App" button and your application will start and performance samples will be collected. You now need to play around in your application for the profiler to get enough data to play with.

After stopping your application, you'll be presented with the sample output with details of when it was profiled, its size and total time it ran.

Double click the session you want to view (if you have more than one) and you can start to drill into method calls with the summary sitting on top and a more visualized version of the method with drilldown capabilities at the bottom.

 

 Simple drill down and you'll see the amount of time spent in every method you drill down into:

 

And further: 

 

 

This is by far, in my oppinion, the best tool that has been released since Silverlight was released. It completes the developer experience and finally we can really show the full potential of Silverlight and the power the CLR actually gives us.

Thanks again to EQATEC for the donation to Balder – we will certainly make use of the license and optimize as close as we can to clock-cycles. 🙂 

 

 

EQATEC donates profiler license to the Balder project

One of the things that has been missing in the Silverlight development story is a proper profiler that is simple to use and does not require you to hack the registry or do complex command line hacks to get it working. The Danish company called EQATEC has been making profilers for a while for the compact framework, but now they have implemented a Silverlight version that I must say I'm really impressed with. EQATEC has donated a professional license to the Balder project and I have already started using it, and my findings are very interesting. I've found more bottlenecks the last 24 hours than I have during the entire course of the project without a profiler. So I'm expecting Balder to get even more speedier in the near future.

If you want to have a look at how the profiler works, Channel 9 has a great video on it here.

 

Balder 0.8.8.6 is out

UPDATE 8th of July 2010 : 0.8.8.7 is out – read more here.

Finally after a couple of months of hard work and polishing the code, API and performance, version 0.8.8.6 ofBalderis out. A SampleBrowser can be found here for viewing most of the features ofBalder.
The features that has changed or is new are as follows:

* Introduced Silverlight in Core, but still maintaining platform independence
– Using core objects directly in Xaml can now be done

* Removed all controls in Balder.Core.Silverlight.Controls – not needed anymore

* Introduced View namespace with IView interface and Camera implementing it

* Viewport has View property insted of Camera

* Moved rendering from a multithread environment to run synchronously on the CompositionTarget. It gives better performance, due to synchronization issues between all threads. Will be revisited in the future.

* New drawing routines, optimized

* Heightmap primitive

* Box primitive

* Rotation, Scale on nodes

* Cylinder primitive

* DebugLevel is known as DebugInfo

* Material system in place

* Support for ReflectionMapping on materials

* Double sided materials

* Sprite rendering with alpha channel

* NodesControl – datadriven nodes control with templating – In Balder.Silverlight.Controls

* NodesStack – datadriven stacking of nodes with templating – in Balder.Silverlight.Controls


Balder 0.8.8.6 is out

UPDATE 8th of July 2010 : 0.8.8.7 is out – read more here.

Finally after a couple of months of hard work and polishing the code, API and performance, version 0.8.8.6 ofBalderis out. A SampleBrowser can be found here for viewing most of the features ofBalder.
The features that has changed or is new are as follows:

* Introduced Silverlight in Core, but still maintaining platform independence
– Using core objects directly in Xaml can now be done

* Removed all controls in Balder.Core.Silverlight.Controls – not needed anymore

* Introduced View namespace with IView interface and Camera implementing it

* Viewport has View property insted of Camera

* Moved rendering from a multithread environment to run synchronously on the CompositionTarget. It gives better performance, due to synchronization issues between all threads. Will be revisited in the future.

* New drawing routines, optimized

* Heightmap primitive

* Box primitive

* Rotation, Scale on nodes

* Cylinder primitive

* DebugLevel is known as DebugInfo

* Material system in place

* Support for ReflectionMapping on materials

* Double sided materials

* Sprite rendering with alpha channel

* NodesControl – datadriven nodes control with templating – In Balder.Silverlight.Controls

* NodesStack – datadriven stacking of nodes with templating – in Balder.Silverlight.Controls