Ahmadre / FlutterIconPicker

An adaptive comprehensive IconPicker for Flutter
MIT License
112 stars 76 forks source link

very slow? #6

Closed Riyad95 closed 4 years ago

Riyad95 commented 4 years ago

hey, thanks for this! I'd love to try it out but its very slow for me. I've read in another issue that it was debug only, so i tried building it and running it on my phone but it is still very slow. takes 3 seconds to open the picker, even scrolling through the icons is somewhat laggy. I'm using the picker with font awesome icon pack, and using this package to get the font awesome icons (https://pub.dev/packages/font_awesome_flutter) My phone is a samsung galaxy s8 plus. if there's anything you need from me to help identify why this is happening then just let me know. hope this gets fixed, looks like a great package tbh. cheers mate

Ahmadre commented 4 years ago

Hi @Riyad95 👋 ,

thank you for your issue.

Maybe I've found a solution for that. It's not even this packages issues, but how Flutter is handling InkWell or InkResponse.

I'll test that with a GestureDetector instead and let you know.

And thanks for your willing to help. Appreciate it a lot 🙏 .

Best regards.

Ahmadre commented 4 years ago

Update: I tested it on the latest Beta: 1.17.* and here're the results (with GestureDetector):

It's fast on every tested device (physical and non-physical): Iphone11Pro (emulator), IPad latest Gen. (physical), Pixel 2XL (physical), Pixel 3 XL (emulator).

BUT: It's lagging on Flutter Web on debug and release. Another BUT: When you activate SKIA-Engine, like Flutter native already activated it on default, Flutter Web is really fast (run: flutter run -d chrome --release --dart-define=FLUTTER_WEB_USE_SKIA=true). But some icon's aren't displayed because SKIA Engine for Flutter Web is still experimental, so don't rely on that.

If you want to help, you can try to fork this repo and implement a pagination on scroll. That would be the most reliable solution I think. 🤔

Ahmadre commented 4 years ago

@Riyad95 I just updated the actual version of this package (and also on pub.dev). Please test it again with the version: 1.1.3 👍

Ahmadre commented 4 years ago

hey, thanks for this! I'd love to try it out but its very slow for me. I've read in another issue that it was debug only, so i tried building it and running it on my phone but it is still very slow. takes 3 seconds to open the picker, even scrolling through the icons is somewhat laggy. I'm using the picker with font awesome icon pack, and using this package to get the font awesome icons (https://pub.dev/packages/font_awesome_flutter) My phone is a samsung galaxy s8 plus. if there's anything you need from me to help identify why this is happening then just let me know. hope this gets fixed, looks like a great package tbh. cheers mate

By the way: you don't need to import on extra the fonts that were used here. Have a look in the dependecies in the pubspec.yaml. It's already integrated with this package 👍

Ahmadre commented 4 years ago

Closing this, in favor of inactivity. Tests on proper devices ran faster as earlier. If you encounter any other performance issues, please answer here.

Thanks.