New check in - Performance

Coordinator
Jun 3, 2010 at 3:19 AM
Edited Jun 3, 2010 at 3:19 AM

I was able to get access to Red Gate's new performance profiler for Silverlight and based on that and some other work around bitmap caching I've checked in a new version that should be far superior in performance to the previous version. One big change:

Previously the bitmap caching was broken and wouldn't actually make any difference. Based on issues with Silverlight 3's bitmap caching support for clipped images it wasn't a priority. With Silverlight 4 clipped images can be cached properly and so this has been fixed and bitmap caching now defaults to true with a RenderAtScale of 1. This can be overridden if it's determined that your game is negatively impacted by turning this on, but this should help most games.

Also if an entire texture is being drawn instead of a piece of a texture this is being done with an image now instead of an imagebrush on a rectangle. This should help performance for cases where the entire texture is being drawn.

Please let me know if there are any issues, if not I will create a new binary and source release soon. 

Jun 3, 2010 at 6:02 AM

The ANTS profiler is brilliant and I'm happy there's now one for Silverlight.  Thank you for your continued efforts with Silversprite - it's appreciated.

I very quickly tried the latest build (49034) and noticed two issues:

1)  When using Rendertargets, there is no image (just a black screen).

2)  There appears to be an alphablend problem when using canvas rendering (bitmap rendering doesn't appear to be affected).

Unfortunately I'm running late so I don't have any time to dig deeper, but look again asap.  It's possible that the latter issue already existed and I just hadn't noticed it before.  Enabling or disabling the bitmap caching doesn't appear to make any difference to either.

Coordinator
Jun 3, 2010 at 11:32 AM

Thanks I figured I probably broke something with these changes, I'll look into it. Can you give me any more details on the alpha blending problem?