chore(data-structures): low-priority follow-ups from a data-structure review
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Dart
- Sterne
- 23
- Forks
- 1
- Ø Merge
- 32 Min.
- Gemergte PRs (30 T.)
- 537
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus QueryaHub/Querya-Desktop
-
enhancement ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
QueryaHub/Querya-Desktop#1689 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowOffenbug frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
QueryaHub/Querya-Desktop#1642 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug error-handling settings
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
QueryaHub/Querya-Desktop#1637 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
QueryaHub/Querya-Desktop#1636 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement marketplace
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
QueryaHub/Querya-Desktop#1635 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in QueryaHub/Querya-Desktop
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
jhomlala/betterplayer#1609 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[FR] 缓存键放置在外面Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bggRGjQaUbCoE/PiliPlus#3310 ·
Maintainer antworten meist innerhalb von 1 Tag
-
package:code_builder type-bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
[material_ui] CalendarDatePicker day numbers are cut off with large text scale on narrow screensOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag