Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Why the frame rate drops (stuttering) in every 10 seconds?

Community Beginner ,
Jun 10, 2013 Jun 10, 2013

I am using AS3 to design the application, I set the FPS to 25, in every 10 seconds, the FPS drops(stuttering), and the screen hangs for about 0.5 seconds, then FPS resumes. I tried GPU, but still the same. I suspected that it might be very resource consuming, and  I lowered down the FPS to 16 or even 8, but it still stutters in every 10 seconds. Can some one help me?

TOPICS
ActionScript
769
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jun 10, 2013 Jun 10, 2013

I have found the cause. There are some movieclips still running some where after I removeChild them which caused the stuttering. Just stop them.

Translate
Community Expert ,
Jun 10, 2013 Jun 10, 2013

you need to optimize your code/display especially if you're creating an app for a mobile device.

one of the easiest things to do is to enable the cacheAsBitmap property of most movieclips and assign a cacheAsBitmapMatrix to those movieclips that would benefit.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 10, 2013 Jun 10, 2013

I already optimized the code with cacheasbitmap. If it is caused by processor consumption, then it should help to lower down the FPS. But it doesn't help in this case, it still stutters every 10 seconds. It might be something else. Does the garbage collecter works every 10 seconds?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 10, 2013 Jun 10, 2013

no, its invoked based on the amount of memory consumed.  i think it's called after every increase of between 15kb and 20kb.  at least, it used to be with fp 9 or so.  i haven't tested in years.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 10, 2013 Jun 10, 2013
LATEST

I have found the cause. There are some movieclips still running some where after I removeChild them which caused the stuttering. Just stop them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines