bug: ion-select with a long list of options is slow to open
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend, performance
調査の方向性
Start with the ion-select popover and ion-radio-group implementation in the Ionic Framework repository, then inspect how experimentalSlotFixes affects option insertion; the issue provides a reproduction repo and links Stencil issue 6973 with performance findings. Compare opening times with 50 and 250 options under 4x CPU throttling. Done means opening scales roughly with option count and the page stays responsive; the proposed shadow DOM change may affect app styling and need a major release.
索引モデルが issue の本文から書いたものです。
説明
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v9.x
Current Behavior
An ion-select with the popover interface takes much longer to open as its list of options grows, and the page is unresponsive for most of that time.
With a full ISO country list of 249 options, it took 1,266ms to open with the CPU slowed down 4x in Chrome 155, compared with 203ms for a 50 option list. The page was unresponsive for 1,133ms of that time. I found out that each new option takes longer to add than the one before it did!
Expected Behavior
Each option should take about the same time to add, so opening the select with 250 options takes at most about five times as long as with 50, and the page should stay responsive while it's opening.
Steps to Reproduce
- Clone the reproduction repo from https://github.com/denodell/ionic-select-slow-open-repro
- Run
npm install, thennpm start, and open the page it serves. - In Chrome's developer tools, set CPU throttling to 4x in the Performance panel.
- Click "Use 50 options", then click the select to open it. Close it.
- Click "Use 250 options", then click the select to open it again.
- The table I put on the page shows measurements of how long each took to open, and the longest frame length while it opened. With 250 options it takes four to five times as long as with 50!
Code Reproduction URL
https://github.com/denodell/ionic-select-slow-open-repro
Ionic Info
@ionic/core 9.0.7, Chrome 155. The reproduction repo doesn't use the Ionic CLI, so there's no output from ionic info.
Additional Information
The actual reason for this happening is Stencil's replacement appendChild function, which experimentalSlotFixes enables. Because ion-radio-group doesn't use shadow DOM, each new ion-radio causes Stencil to check all the existing options in the group twice, once to find the right slot and once to work out where the new one goes. You can see this in a Performance panel recording of the select opening, where most of the time taken is in Stencil's runtime, with its replacement appendChild taking around half of the total time.
I've raised that already with the Stencil team here: https://github.com/stenciljs/core/issues/6973
On Ionic's side, giving ion-radio-group shadow DOM would avoid it, since the browser would handle the slots. I realize that changes how apps can style the group, so it might need to wait for a major release.
- 主要言語
- TypeScript
- スター
- 52.8k
- フォーク
- 13.3k
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 86
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/ionic-framework のほかの issue
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous box対応中かも @sarankumar1325 が 23 日前に担当しました。 オープンpackage: core type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
ionic-team/ionic-framework#31639 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: vue swipe cancellation throws when the previous page is missing対応中かも @dandoingdev が 46 日前に担当しました。 オープンpackage: vue type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ionic-team/ionic-framework#31514 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwarded対応中かも @HappyKnuckles が 41 日前に担当しました。 オープンa11y package: core type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
ionic-team/ionic-framework#31492 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: IonTabs throws when a Fragment contains one IonRouterOutlet対応中かも @Benziza が 82 日前に担当しました。 オープンpackage: react type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ionic-team/ionic-framework#31410 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is captured対応中かも @officialasishkumar が 9 日前に担当しました。 オープンpackage: angular type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
ionic-team/ionic-framework#31291 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
ionic-team/ionic-framework の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lingdojo/kana-dojo#34223 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
mastra-ai/mastra#30587 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:web p2 product:business triage:active type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cuadrao-ai/argus#2228 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
embedpdf/embed-pdf-viewer#1098 ·
メンテナーはふだん 1 日以内に返信
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
metabase/metabase#87252 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信