[Feature]: Improve ChangeSet emission when a single item moves upwards in index on a Sort
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading Internal/List.cs and the ChangeAwareList.Move implementation described in the issue, then look for tests covering sort-driven move changes and reset thresholds. Verify the proposed single-item upward move case against the existing change stream behavior. Done means the case emits one Move change rather than many, with tests confirming the bound-list reset threshold is not triggered.
索引モデルが issue の本文から書いたものです。
説明
Describe the functionality desired 🐞
Currently, if a Sort causes a single item to move from a low index to a high index, instead of generating one single Move change for the given item, the Reorder implementation in Internal/List.cs emits move down by 1 events for every item in the list between the old and new index of the 'moved' item.
I understand that moving one item up n spaces, and moving n items down 1 space are equivalent and symmetric operations, but the stream of change events from each item moving can easily trigger reset thresholds (eg on Bind)
It's an uncomfortable gotcha when a 'single' upstream property change explodes into a stream of N events, and then resets all bound view components due to a list refresh just because it moved more than 25 indices.
I understand this is a well known problem in React as well, just in the opposite direction
I know that finding a minimal sequence of moves is O(n^2), but it should be possible to optimize for the 'single item moved up' case by adding some logic in ChangeAwareList.Move which:
- Detects 'move down by 1' events (
destination == original - 1) - Converts them to 'move up by 1' events on the previous item
- Checks the last entry in
_changes. If it is a move up bynevent, withlast.destination == destinationthen instead of emitting a new event, convert the last event to 'move up byn+1'
The steps the functionality will provide
Performance optimization and no rest threshold triggered when a single item moves up in index due to a sort.
Considerations
I don't have a checkout of the code available to test my theory. A workaround exists to just set resetThreshold: int.MaxValue but it's a bit uncomfortable
- 主要言語
- C#
- スター
- 1.9k
- フォーク
- 194
- 平均マージ
- 12分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
reactivemarbles/DynamicData のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
reactivemarbles/DynamicData#1229 ·
メンテナーはふだん 1 日以内に返信
-
infrastructure
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
reactivemarbles/DynamicData#1089 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: ChangeAwareList merges an insert one slot before a pending AddRange, corrupting list order downstream対応中かも @dwcullop が 9 日前に担当しました。 オープンbug
難易度 3/5 半日 初心者へのやさしさ 63/100
reactivemarbles/DynamicData#1225 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Make Avg, StdDev, Maximum and Minimum refresh-aware, consistent with Sum対応中かも @dwcullop が 14 日前に担当しました。 オープンbreaking change enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
reactivemarbles/DynamicData#1214 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
reactivemarbles/DynamicData#1196 ·
メンテナーはふだん 1 日以内に返信
reactivemarbles/DynamicData の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
immichFrame/ImmichFrame#735 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dimitar-radenkov/Pointframe#318 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DotHarness/dotcraft#546 ·
メンテナーはふだん 1 日以内に返信
-
a-corriger bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
christian-raj/S-Aloha#303 · コメント 1 件 ·
-
Input editor says "Apply Changes" even when no changes have been made.対応中かも @hcooper が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
MobiFlight/MobiFlight-Connector#3526 ·
メンテナーはふだん 1 日以内に返信