perf(fonts): batch-prewarm CJK library navigation - #3
Conversation
|
@szetszho 您好,我測試了一陣子此 PR 之後的心得是:「五秒改善為一秒可接受,但仍想更進一步加速」。 |
|
@szetszho 實際測試過,發現 lru cache 機制讓 ui 使用的延遲維持依然在 1 秒左右。 |
你有在用哪個字體? |
|
Thanks for this — the approach is solid (batch-before-loop, 1. Fast-path early-out in 2. Shared font instance when reader size == UI size (needs on-device test) 3. Heap numbers for the doubled cache Minor (fine as follow-ups):
Generated by Claude Code |
我一般都用 NotoSansMonoCJK 8~18 的字體。 |
Skip codepoint buffer allocation when requested UI glyphs are already cached. Serialize cache mode changes and main-task text measurement with RenderLock.
|
Hey, could you start another pull request to the |
|
Hi @szetszho , do you plan to submit any further CJK UI-related PRs upstream, especially the batch-prewarm and font-cache improvements from this PR? If not, I can rebase these changes onto the latest upstream develop branch and open a PR directly against crosspoint-reader/crosspoint-reader, so we can avoid duplicating work. |
|
Maybe you can make a pr to the upstream repo instead.
Best Regards,
Max Sze
…On Fri, Jul 24, 2026 at 17:18 牧羊犬真Q ***@***.***> wrote:
*CollieIsCute* left a comment (szetszho/crosspoint-reader#3)
<#3 (comment)>
Hi @szetszho <https://github.com/szetszho> , do you plan to submit any
further CJK UI-related PRs upstream, especially the batch-prewarm and
font-cache improvements from this PR? If not, I can rebase these changes
onto the latest upstream develop branch and open a PR directly against
crosspoint-reader/crosspoint-reader, so we can avoid duplicating work.
—
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AGCSZYI7P7HS5UDNESALTRT5GPVDJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXGU2DMMBRGM42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5075460139>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGCSZYJPBX42XGM2NVCXCFL5GPVDJAVCNFSNUABGKJSXA33TNF2G64TZHMYTEOBXGM3TENBVGQ5US43TOVSTWNBYGYYTMNZTHEZDNILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AGCSZYOO7AFZRC2TUTTTDPT5GPVDJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXGU2DMMBRGM42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AGCSZYPELKV4BRM2FPMMGL35GPVDJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBXGU2DMMBRGM42M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @szetszho,
This improves Up/Down navigation in directories with many Chinese books by about 5x on my Xteink X4: full-screen rendering dropped from roughly 5 seconds to 1 second.
This PR keeps:
After testing the LRU implementation on-device, I found no user-visible speedup in this workflow. This PR therefore removes all LRU-related changes and retains the smaller fixed-cache implementation.
I will revisit an LRU design later if it can materially reduce the remaining latency. The current roughly one-second response is usable, and this branch tested normally on my X4.