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

Add ExpansionTile.builder ? ExpansionTile Performance Issue #40752

Closed
ghost opened this issue Sep 18, 2019 · 6 comments
Closed

Add ExpansionTile.builder ? ExpansionTile Performance Issue #40752

ghost opened this issue Sep 18, 2019 · 6 comments
Labels
c: new feature Nothing broken; request for a new capability 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-web Web applications specifically

Comments

@ghost
Copy link

ghost commented Sep 18, 2019

ExpansionTile needs a (.builder constructor) just like listview
if expansion tile have lots of heavy children it causes hard fps drop

[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17763.678], locale en-US)
    • Flutter version 1.9.1+hotfix.2 at C:\flutter
    • Framework revision 2d2a1ffec9 (11 days ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:\Users\Kirolous.nashaat\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • ANDROID_HOME = C:\Users\Kirolous.nashaat\AppData\Local\Android\Sdk
    • Java binary at: D:\Sources\android-studio-ide-181.4987877-windows\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[!] Android Studio (version 3.2)
    • Android Studio at D:\Sources\android-studio-ide-181.4987877-windows\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.1
    • Flutter plugin version 39.0.5
    • Dart plugin version 192.6603.23

[√] Connected device (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category.
@ghost ghost added the c: performance Relates to speed or footprint issues (see "perf:" labels) label Sep 18, 2019
@HansMuller HansMuller added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: new feature Nothing broken; request for a new capability labels Sep 18, 2019
@deisold
Copy link

deisold commented Dec 10, 2019

on Flutter Web (Channel master, v1.13.1-pre.76) it stucks completely and the listview stops scrolling while cpu gets up to 100%.

Would be nice to have this fixed.

@liyuqian liyuqian added the platform-web Web applications specifically label Oct 12, 2020
@liyuqian
Copy link
Contributor

Adding web label as the performance seems to be particularly bad on web. This doesn't seem to be a very complicated change so I'm adding it to "Framework Performance Opportunities" project.

@yjbanov
Copy link
Contributor

yjbanov commented Oct 15, 2020

We made some improvements in Q2 in scrollable content with lots of children. Is there a repro case we could look at?

@yjbanov yjbanov added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 15, 2020
@jmagman
Copy link
Member

jmagman commented Nov 5, 2020

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!

Thanks for your contribution.

@jmagman jmagman closed this as completed Nov 5, 2020
@pedromassangocode pedromassangocode removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 20, 2020
@MatrixDev
Copy link

I have the same issue. Which exact information do you need?
Just create ListView with ExpansionTile which contains 1000+ heavy items and fps will stuck.
Problem is that ExpansionTile, unlike ListView, is not lazy and loads all the items at once. It must load only visible items to have optimal performance.

    final Widget result = Offstage(
      child: TickerMode(
        child: Padding(
          padding: widget.childrenPadding ?? EdgeInsets.zero,
          child: Column(
            crossAxisAlignment: widget.expandedCrossAxisAlignment ?? CrossAxisAlignment.center,
            children: widget.children, // <<< this is what causes performance problems
          ),
        ),
        enabled: !closed,
      ),
      offstage: closed
    );

In my case I have 3 ExpansionTile collapsed by default with 100+ items in each. First time displaying my screen takes a huge performance hit, same as each collapse/expand.

IMHO to properly fix this issue ExpansionTile must cooperate with ListView very tightly to display only visible children.

@github-actions
Copy link

github-actions bot commented Aug 3, 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 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability 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-web Web applications specifically
Projects
None yet
Development

No branches or pull requests

7 participants