Analysis catalog takes seconds to open on large drafts
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- performance
Hướng nghiên cứu
Start in selectCatalogRows, buildCatalogRows, deriveFacets, and applyCatalogQuery to trace the catalog work described in the issue. Compare the measured costs and consider the three proposed approaches; the issue does not identify test files or a preferred fix. Done means catalog opening and edits avoid the reported multi-second rebuild while preserving correct rows and sorting.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
On a large project, switching the side panel from Concordance to the Analysis catalog takes about 4 seconds. Switching the other way is instant.
Steps to reproduce
- Open a project with a large interlinear draft.
- Open the side panel on Concordance.
- Switch to the Analysis catalog.
Cause
The concordance's entries are built in SourceTextProvider, above the side panel. Showing the concordance only renders entries that already exist.
The catalog builds its rows when it mounts. selectCatalogRows calls buildCatalogRows, which goes through every token-analysis link in the draft:
- It parses each approved and stale link's token ref (
parseUsage). - It sorts each analysis's usages with
compareDocumentOrder, which callsCanon.bookIdToNumbertwice per comparison. - It builds folded search text for each analysis. This is cached per record.
On every mount, the panel also runs deriveFacets and sorts the full list with applyCatalogQuery.
Measurements
From a synthetic benchmark with 30k analyses and 300k approved links across 66 books:
| Step | Time |
|---|---|
buildCatalogRows |
0.9–2.3 s |
deriveFacets |
~80 ms |
applyCatalogQuery (default sort) |
140–200 ms |
When it recurs
selectCatalogRows keeps its result between visits. Reopening the catalog with no edits in between should cost only the facets and the sort.
Any write to analyses or links invalidates that result. The next open pays for a full rebuild.
While the catalog is open, the rebuild also runs after every analysis edit, such as committing a gloss. On large drafts this probably shows up as lag after each edit.
Possible fixes
- Update the rows incrementally, so an edit rebuilds only the analyses it touched.
- Store each usage's book number when it is parsed, so the sort doesn't look it up on every comparison.
- Keep the catalog mounted while it is hidden. This only helps when nothing was edited in between.
- Ngôn ngữ chính
- TypeScript
- Star
- 2
- Fork
- 0
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sillsdev/interlinearizer-extension
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
sillsdev/interlinearizer-extension#506 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
sillsdev/interlinearizer-extension#505 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
sillsdev/interlinearizer-extension#504 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
sillsdev/interlinearizer-extension#496 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
sillsdev/interlinearizer-extension#495 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sillsdev/interlinearizer-extension
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
farion1231/cc-switch#8829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverĐang mởdoc-audit enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100