Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircularProgressIndicator causes 100% CPU on IOS simulator #21445

Closed
mgleason opened this issue Sep 5, 2018 · 10 comments · Fixed by #21832
Closed

CircularProgressIndicator causes 100% CPU on IOS simulator #21445

mgleason opened this issue Sep 5, 2018 · 10 comments · Fixed by #21832
Labels
c: performance Relates to speed or footprint issues (see "perf:" labels) f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically

Comments

@mgleason
Copy link

mgleason commented Sep 5, 2018

Steps to Reproduce

  1. Create main.dart containing:
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: CircularProgressIndicator(
          value: .8,
        ),
      ),
    );
  }
}
  1. Run it on the IOS simulator
  2. Run top -o cpu
PID    COMMAND      %CPU
47633  Runner       58.6
46728  backboardd   43.4
  1. Replace CircularProgressIndicator(value: .8), with Column(),
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(),
      ),
    );
  }
}
  1. Note Simulator CPU usage drops to zero.

Flutter Doctor

[✓] Flutter (Channel beta, v0.6.0, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 0.6.0 at /Users/jeff/Dev/2_flutter_tool/flutter
    • Framework revision 9299c02cf7 (3 weeks ago), 2018-08-16 00:35:12 +0200
    • Engine revision e3687f70c7
    • Dart version 2.1.0-dev.0.0.flutter-be6309690f

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).
      If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✗] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).

[✓] VS Code (version 1.26.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.18.0

[✓] Connected devices (1 available)
    • iPhone 7 • D840D735-FEF3-4486-940C-923FC8044EB5 • ios • iOS 11.4 (simulator)
@zoechi zoechi added platform-ios iOS applications specifically framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. c: performance Relates to speed or footprint issues (see "perf:" labels) labels Sep 5, 2018
@zoechi zoechi added this to the Goals milestone Sep 5, 2018
jason-simmons added a commit to jason-simmons/flutter that referenced this issue Sep 14, 2018
@kirgene
Copy link

kirgene commented Feb 21, 2019

I see high CPU usage when running flutter app using desktop-embedding on Ubuntu 18.04.
Here is an endless animation example that demonstrates this issue:
https://gist.github.com/kirgene/00362d280430df48513ee691b2149a9e

@DazChong
Copy link

This issue still exist today:

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57,
    locale en-SG)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.0)
[✓] Connected device (2 available)

@magnuswikhog
Copy link

This issue affects Android Emulators as well, CPU usage skyrockets and fans go on full blast after showing a CircularProgressIndicator for ~20+ seconds.

[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.5 18F132, locale en-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.3.4)
[✓] Connected device (1 available)

@kasvith
Copy link

kasvith commented Apr 25, 2020

Still exists

[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    X Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[!] Android Studio (version 3.5)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.44.2)
[√] Connected device (1 available)

@retkpop
Copy link

retkpop commented Aug 8, 2020

Still exists

@treeder
Copy link

treeder commented Apr 8, 2021

Still exists, in particular when indeterminate. Why was this closed?

@nicholasspencer
Copy link

I experience this regularly.

@treeder
Copy link

treeder commented Apr 28, 2021

Also a problem on flutter web, pins the CPU in Chrome. Especially bad when dev tools is open and it looks like it's continuously logging the frame output to debug (hidden logs in dev tools, that you can unhide to see).

@xurshid29
Copy link

Still exists

@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: performance Relates to speed or footprint issues (see "perf:" labels) f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants