chore(data-structures): low-priority follow-ups from a data-structure review
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
調査の方向性
Start with lib/core/database/connection_pool_lock.dart and add tests for concurrent callers, separate keys, and synchronous or asynchronous failures; the issue says the class currently has no tests. Check the three pool implementations for PostgreSQL, MySQL, and SQLite when judging whether re-entrancy matters. Done means the tests establish the intended behavior and _lock is removed or its purpose is documented; the boolean-column and interning ideas are explicitly conditional.
索引モデルが issue の本文から書いたものです。
説明
Findings from a review of the data structures, checked against dev. The two that pay off are in #1682 (Redis folder key count, groupings number parsing). What is left is small; each item says whether it is worth doing.
1. PoolEntryLock._lock is never active (worth a test first)
lib/core/database/connection_pool_lock.dart: createIfAbsent sets _lock, runs a block with no await, and clears it in finally in the same turn, so the while (_lock != null) await _lock loop never waits. De-duplication really comes from _pending[key]. The one thing the lock changes is re-entrancy: a call to createIfAbsent made from inside create() waits instead of running at once. The class has no tests and three pools use it (PostgreSQL, MySQL, SQLite).
- Add tests: two callers, one key, one
create(); two keys in parallel; a failingcreate()clears the entry;create()that throws synchronously. - Then drop
_lock(or keep it and say why in the doc comment).
2. BooleanCompactColumn (probably not worth it)
Boolean columns are stored as 0/1 in Int64List (8 bytes per row, about 790 KB per column at 100k rows more than a bit array). A packed column touches formatting, sort, type detection and export. Only do this if a profile shows boolean columns dominating the heap.
3. StringInternPool does not evict
When maxEntries (4096) is reached, new strings are simply not interned. That is the right trade for a bounded pool; an LRU would add bookkeeping to a hot path. Only revisit if results with more than 4096 distinct short values are common.
Considered and rejected
MetricHistory.recordusesremoveRange(0, 1)on a list of at most 120 samples every 5 s: a copy of 120 references. A ring buffer would be more code for no visible gain.GenericCompactColumn.formatterand isolates: noted on #1549, where the isolate hand-off is in scope.
- 主要言語
- Dart
- スター
- 23
- フォーク
- 1
- 平均マージ
- 32分
- マージ済み PR(30日)
- 537
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QueryaHub/Querya-Desktop のほかの issue
-
enhancement ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1689 ·
メンテナーはふだん 1 日以内に返信
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowオープンbug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
QueryaHub/Querya-Desktop#1642 ·
メンテナーはふだん 1 日以内に返信
-
bug error-handling settings
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1637 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
QueryaHub/Querya-Desktop#1636 ·
メンテナーはふだん 1 日以内に返信
-
enhancement marketplace
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QueryaHub/Querya-Desktop#1635 ·
メンテナーはふだん 1 日以内に返信
QueryaHub/Querya-Desktop の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jhomlala/betterplayer#1609 ·
メンテナーはふだん 1 日以内に返信
-
[FR] 缓存键放置在外面オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bggRGjQaUbCoE/PiliPlus#3310 ·
メンテナーはふだん 1 日以内に返信
-
package:code_builder type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[material_ui] CalendarDatePicker day numbers are cut off with large text scale on narrow screensオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信