Skip to content

bug: ion-picker performance is very poor with 1000 entries #23964

Closed

Description

@konsultaner

Prequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

The current performance for the ion-picker with about 1000 elements is very poor in android

Expected Behavior

Be smooth.

Steps to Reproduce

This is my code:

         pickerController.create({
            buttons: [
                {
                    text: 'Cancel',
                    role: 'cancel',
                },
                {
                    text: 'OK',
                    handler: (pickedValue) => {
                        // do something
                    },
                },
            ],
            columns: [
                {
                    name: 'amount',
                    selectedIndex: selectedAmount,
                    options:
                        (() => {
                            const result  = [];
                            for (let i = 0; i < 1000; i++) {
                                result.push({ text: i.toString(10), value: i });
                            }
                            return result;
                        })()
                    ,
                }
            ]
        }).then((picker: HTMLIonPickerElement) => {
            picker.present();
        });

Code Reproduction URL

No response

Ionic Info

Ionic:

   Ionic CLI                     : 5.4.16 (C:\Users\burkh\AppData\Roaming\nvm\v14.17.0\node_modules\ionic)
   Ionic Framework               : @ionic/angular 5.5.2
   @angular-devkit/build-angular : 0.1100.5
   @angular-devkit/schematics    : 11.0.5
   @angular/cli                  : 11.0.5
   @ionic/angular-toolkit        : 3.0.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 9.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 11 other plugins)

Utility:

   cordova-res : 0.15.2
   native-run  : 1.3.0

System:

   NodeJS : v14.17.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.13
   OS     : Windows 10

Additional Information

No response

Activity

  1. liamdebeasi commented on Sep 22, 2021

    @liamdebeasi
    Contributor

    Thanks for the issue. We are tracking datetime/picker issues here: #16630. I have added your issue there.

  2. ionitron-bot commented on Oct 22, 2021

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  3. locked and limited conversation to collaborators on Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions