# FPS Slowing Over Time

**URL:** https://forum.kirupa.com/t/fps-slowing-over-time/327728
**Category:** flash
**Created:** [March 23, 2012, 12:16pm UTC](https://forum.kirupa.com/t/fps-slowing-over-time/327728 "2012-03-23T12:16:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Erigrath](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@Erigrath](https://forum.kirupa.com/u/Erigrath)
#### Post date: [March 23, 2012, 12:16pm UTC](https://forum.kirupa.com/t/fps-slowing-over-time/327728/1 "2012-03-23T12:16:14Z")

</div>

After noticing a gradual increase in lag in a game I’m writing,  
I started a brand new project and wrote this simple counter  
to test if it would slow down eventually as well. Unfortunately,  
once the count reaches about 20,000 , there is a noticeable decrease  
in FPS. What’s going on?

```auto

var count:int = 0;

stage.addEventListener(Event.ENTER_FRAME, mainLoop);
function mainLoop(e:Event):void {
    count++;
    Count.text = String(count);
    
}

```
