# Way to detect inefficient sections of code (or just which parts are called the most)?

**URL:** <https://forum.kirupa.com/t/way-to-detect-inefficient-sections-of-code-or-just-which-parts-are-called-the-most/239686>\
**Category:** flash\
**Created:** [September 24, 2007, 8:54pm UTC](https://forum.kirupa.com/t/way-to-detect-inefficient-sections-of-code-or-just-which-parts-are-called-the-most/239686 "2007-09-24T20:54:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![to\_the\_sun](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@to\_the\_sun](https://forum.kirupa.com/u/to_the_sun)\
**Post date:** [September 24, 2007, 8:54pm UTC](https://forum.kirupa.com/t/way-to-detect-inefficient-sections-of-code-or-just-which-parts-are-called-the-most/239686/1 "2007-09-24T20:54:18Z")

</div>

Is there something built into Flash 8 that can help me detect which parts of my code get run the most?

I’m making a game that starts to slow down after a certain number of moving objects are on the screen. At first it would slow down with only a few objects, but i’ve been working real hard on making it more efficient and now i have it so that it doesn’t slow down until about 18 objects, but i still want to improve upon this.

Anyway, it would be SO much easier if i could say, play my game for a while and then when i was done Flash would tell me how many times each line of my code was called during that session. Then i could look at the lines that are getting called the most and see if i can make it so they are called less.

Any ideas?
