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

[Bug] GoogleFonts.noToColorEmoji performance issue #205

Open
efalco777 opened this issue Jun 20, 2024 · 4 comments
Open

[Bug] GoogleFonts.noToColorEmoji performance issue #205

efalco777 opened this issue Jun 20, 2024 · 4 comments

Comments

@efalco777
Copy link

efalco777 commented Jun 20, 2024

How to reproduce:

  1. Replace initState with in main_custom_font.dart in lib/example of the project with:
@override
  void initState() {
    final fontSize = 24 * (isApple ? 1.2 : 1.0);
    // 1. Define Custom Font & Text Style
    _textStyle = DefaultEmojiTextStyle.copyWith(
      fontFamily: GoogleFonts.notoColorEmoji().fontFamily, // <---- notoColorEmoji instead of notoEmoji
      fontSize: fontSize,
    );

    // 2. Use EmojiTextEditingController
    _controller = EmojiTextEditingController(emojiTextStyle: _textStyle);
    super.initState();
  }
  1. open bottom sheet.

Expected:
App runs same as with other fonts

Actual:
App freezes on scroll, changing emoji tab, emoji picking etc. everythin that may update the sheet causes it to freeze up.

Issue might be related to debug asserts. This functionality is untestable on debug mode. Seems to run ok on profile mode nevermind it also lags, seems to be unrelated to google fonts as i've imported font manually it also simply makes the app unresponsive.

@Fintasys
Copy link
Owner

Fintasys commented Jul 15, 2024

@efalco777 I'm sorry for the performance issues you see with the custom font. I followed the discussion on pro_image_editor thread and unfortunately, I don't have any further suggestions as the author there.
I'm open for suggestions and hoping for impeller improvements soon 🙏

@hm21
Copy link

hm21 commented Aug 7, 2024

@efalco777 Flutter just had an update to version 3.24.0 and as we can see in the post here they mention it that they now improved the impeller for better emoji rendering. I recommend you to test it, maybe this issue is resolved now.

@Fintasys
Copy link
Owner

Fintasys commented Aug 8, 2024

I tested it with 3.24.0 but unfortunately the performance is still very bad on iOS. I can't recognize and improvement to previous version.

@JeanPSF
Copy link

JeanPSF commented Sep 26, 2024

Adding the controller to the emoji picker completely freezes the app as soon as i open it (web). Is it related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants