# AS3 Raycaster - IE performace issues

**URL:** <https://forum.kirupa.com/t/as3-raycaster-ie-performace-issues/252155>\
**Category:** Uncategorized\
**Created:** [February 16, 2008, 10:20pm UTC](https://forum.kirupa.com/t/as3-raycaster-ie-performace-issues/252155 "2008-02-16T22:20:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![8bitninja](https://avatars.discourse-cdn.com/v4/letter/8/e9c0ed/32.png) [@8bitninja](https://forum.kirupa.com/u/8bitninja)\
**Post date:** [February 16, 2008, 10:20pm UTC](https://forum.kirupa.com/t/as3-raycaster-ie-performace-issues/252155/1 "2008-02-16T22:20:44Z")

</div>

[FONT=Courier New]I’m developing a custom ray caster in AS3. Recently, I’ve been focusing on speed optimizations. I typically test in Firefox, however I’ve noticed the methods I’m currently using absolutely **kill** performance in IE7 Vista and IE7 XP Pro. I’m assuming it’d be about the same in IE6. Has anyone else encountered this issue? Hopefully there’s some better method than what I’m using right now to redraw the screen several times per second.

Here’s an example of the method I’m using to display pixels:

```php

var i:int;
var j:int;
var color:uint;
var sw:int=stage.stageWidth;
var sh:int=stage.stageHeight
var bmd:BitmapData=new BitmapData(sw,sh,false,0);
var bmp:Bitmap=new Bitmap(bmd);
stage.addChild(bmp);
stage.addEventListener(Event.ENTER_FRAME,process);
function process(e:Event):void{
    for(i=0; i<sw; ++i){
        for(j=0; j<sh; ++j){
           bmd.setPixel(i,j,color);
        }
    }
}

```

…where color = getPixel() call from another BitmapData.

See my most current working example here:

[http://peaceoutside.org/3d.php](http://peaceoutside.org/3d.php)

Even though there’s a start button, you have to click the flash again to gain focus for keyboard events for some reason.

In Internet Explorer, the FPS seem to be about the same as Firefox, but the actual redraw rate is complete crap. Basically completely unusable.

Anyone else have this problem? Any known workarounds or fixes? Is there a faster way to update a bitmap several times per second?

:ninja:  
[/FONT]
