BitmapData.setPixel() 1000x slower than Adobe Flash

Bug #1085164 reported by zahurdias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lightspark
Fix Released
Medium
Unassigned

Bug Description

Lightspark is 1000 times slower than Adobe Flash. The same code in lightspark is actually quicker using drawRect() than using setPixel()

see:

http://wonderfl.net/c/sGFo

and:

http://wonderfl.net/c/woTg

Tags: performance
Revision history for this message
Antti Ajanki (aajanki) wrote :

Yes, this is currently horribly slow because the whole bitmap is copied on every setPixel() call; Bitmap::updatedData() copies the data into style.bitmap. The copy can be avoided if Bitmap and BitmapData share the same pixel array (which is the whole point of BitmapData class anyway).

Changed in lightspark:
importance: Undecided → Medium
status: New → Confirmed
Antti Ajanki (aajanki)
tags: added: performance
Revision history for this message
Antti Ajanki (aajanki) wrote :

Excessive copying in is now fixed. The test SWF is still more than 10x slower than in Adobe due to general slowness of integer computations in Lightspark. I'll close this bug, because the specific problem with setPixel is resolved.

Changed in lightspark:
status: Confirmed → Fix Committed
Antti Ajanki (aajanki)
Changed in lightspark:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.