Re: Slow performance in VS2005 with Texture from Bitmap
- From: "ZMan" <zman@xxxxxxxxxxxxxx>
- Date: Fri, 25 Nov 2005 20:02:55 -0800
I cross posted this to gamedev where the thread was slightly different and
got correctly called on some assumptions I'd made on this one.
Whilst the investigation I did was valid I didn't take into account that
running without the debugger didn't show the slowdown so its defiantly a
debugger problem - not MDX, .Net 2.0 or the code changes I found in the
We'll follow up with the debugger folk to see if we can get an answer to
this. I tried disabling the MDAs since they are new debugging tools in
VS2005, but that didn't help any
http://www.thezbuffer.com - News and information for Managed DirectX
"ZMan" <zman@xxxxxxxxxxxxxx> wrote in message
>I spent a little time looking at this. Tom indicated to me that the MDX
>code hasn't changed so it had to be a change in .Net 2.0. He also told me
>that the from bitmap code uses bitmap.GetPixel to be an generic as possible
>and deal with all formats of bitmap.
> Comparing the perf of GetPixel between 1.1 and 2.0 gives a 20x decrease in
> speed whcih nicely explains the MDX decrease.
> So comparing GetPixel in 1.1 with 2.0 with reflector the only difference
> is that 2.0 range checks X&Y before interoping into GDI. 4 comparisons
> didn't seem too harsh to me, but it compares against .Width and .Height
> which are interop functions themselves. So each call to GetPIxel has 2
> extra interop calls to GDI and 4 comparisons.
> So there is no easy work around other than rolling your own. You should be
> able to match the 2003 perf and still cover all the bitmap functions by
> writing your own that interops into GDI.
> I didn't notice any increase in speed when compiling in release mode on my
> performance test, which makes sense. In the reported cases it must have
> been a speed up in the rest of your code rather than a speed up in the
> perf of texture loading.
> I don't know if the DX team will be speeding this up in future releases,
> but it looks like a good area for perf increases.
> http://www.thezbuffer.com - News and information for Managed DirectX
> "Matt Wyckhouse" <MattWyckhouse@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> message news:9382E48C-D319-4D79-826F-62BD96D30E8F@xxxxxxxxxxxxxxxx
>> Thanks for the information ZMan. It's good to know that I'm not the only
>> with this problem, but it would be nice for one of the MVPs to look into
>> this. I would like to be able to debug my app without these rediculous
- Prev by Date: Re: After DirectDraw??
- Next by Date: Re: Missing Module- URGENT
- Previous by thread: Re: Slow performance in VS2005 with Texture from Bitmap
- Next by thread: DirectX in /clr