[Mono-list] LockBits() on Mono 2.2?

Stifu stifu at free.fr
Fri Mar 20 13:16:38 EDT 2009


Mono being faster than .NET with SetPixel must have been on a particular
case... I have found a huge performance issue with Mono and Get/SetPixel()
in a particular situation, making Mono crawl... Something instantaneous with
.NET can easily take 10 seconds with Mono (the perf hit is exponential,
too).
I couldn't make a reduced test case for that one either yet...

But hey, that aside, I've been happy with Mono too. :p


Dan Shryock wrote:
> 
> On Fri, Mar 20, 2009 at 8:40 AM, LKeene <lionel.keene at gmail.com> wrote:
>>
>> I actually intend to use it to draw to a memory bitmap pixel-by-pixel,
>> rather
>> than calling SetPixel() each time. Apparently that would be extremely
>> slow
>> form what I've read online. The only alternative to Set/GetPixel() seems
>> to
>> be declaring an unsafe block and using LockBits(). I'll try to test the
>> mono
>> LockBits() implementation today, but assuming that there is indeed a bug,
>> does anyone have any other ideas of how to accomplish drawing to a memory
>> Bitmap other than SetPixel()? I have a precomputed "Color[,]" that
>> specifies
>> the pixels colors.
> 
> In a recent project, I had no troubles working with lockbits on Mono
> 1.9 on linux.
> In the past, using some older version of Mono (probably 1.1.x or 1.2.x) I
> had
> encountered few troubles working with lockbits but they have been resolved
> in
> newer Mono releases.
> 
> Another thing that I noticed is that calling SetPixel repeatedly on
> Microsoft's
> .NET is much slower than calling SetPixel repeatedly on Mono (though
> lockbits
> was still faster on both).
> 
> HTH
> 
> Dan
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/LockBits%28%29-on-Mono-2.2--tp22611389p22624871.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list