Repository navigation
חיפוש: ספרי היסוד בתפריט ההיקף נקראים מהמטמון שב-isolate (issue #6040) - #6052
Merged
Merged
Conversation
…ia#6040) התפריט סרק את טבלת book (`isBaseBook = 1`, בלי אינדקס) על חיבור ה-UI בכל פתיחה, ובדיסק איטי זה תקע את הממשק 13 שניות. BookFacetMetadataCache כבר קורא את אותה שאילתה ב-isolate, ומעכשיו הוא חושף את המזהים. השיטה SeforimRepository.loadBaseBookIds, שלא נשאר לה קורא, נמחקה. Fixes Otzaria#6040
Y-PLONI
force-pushed
the
fix/6040-base-books-off-ui
branch
from
November 27, 2026 00:34
3209cfe to
8eb7a13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6040
מה קרה
תקיעת UI של 13 שניות. החוט הראשי עמד ב-
sqlite3_step←SeforimRepository.loadBaseBookIds, שנקראת מ-_loadBaseBookIdsב-initStateשל תפריט היקף החיפוש. השאילתהSELECT id FROM book WHERE isBaseBook = 1סורקת את כל טבלתbook(בלי אינדקס, כ-7MB) על חיבור ה-UI, בכל פתיחה של התפריט. בדיסק איטי או עם מטמון קר זה חוסם את הממשק.התיקון
BookFacetMetadataCache.instance.warmUp(), שכבר מריץ את אותה שאילתה ב-isolate (DbReadWorker.runOnFreshIsolate/Isolate.run), וקורא שני getters חדשים לקריאה בלבד:baseBookIdsו-baseUserBookIds.SeforimRepository.loadBaseBookIdsנמחקה, כי לא נשאר לה קורא.navigation_repository,app_runtime_reset). ספרים אישיים נוצרים תמיד עםisBaseBook = false(generator.dart:255,insertExternalContentBook), ולכן גם קודם הקבוצה שלהם הייתה ריקה בפועל.בדיקות
test/indexing/utils/book_facet_metadata_cache_test.dartו-test/search/: 1223 עברו, כולל בדיקה חדשה של ה-getters (ריקים לפניwarmUp, מלאים אחריו, ריקים אחריclear, ולא ניתנים לשינוי).warmUpעל ה-UI, ושאין הפניות נוספות.PRs פתוחים חופפים
search_scope_menu.dart): מתמזג נקי.search_scope_menu.dart): מתמזג נקי עם השינוי הזה. הקונפליקט שנשאר לו, ב-settings_catalogs.g.dart, הוא מול dev עצמו.