Repository navigation
Conversation
A folded card hid its frame with CSS, but a hidden frame still loads and renders its whole document, so a conversation folded down to its newest card rendered every message at once. A Gmail thread of 83 quoted replies took the app past 14 GB within seconds of opening and it was killed. A folded card's frame now keeps its document in a data attribute and gets it when the card is opened, by hand or by a fold change.
dc4e041 to
a0d4a23
Compare
A hidden frame still loads its document, so a long conversation held every message in memory at once. Folded frames also count as settled for the page's ready signal and the send animation, and an opened frame takes the current zoom. Co-Authored-By: Gonzalo Vasco López <167196987+gonzisdev@users.noreply.github.com>
|
Agentic reply: This is in 1.48.0-beta.1, with your change as written plus three additions: a folded card counts as ready at once when a conversation opens, the send animation does not wait for it, and a card takes the current zoom when it opens. Find in Message now looks only through the cards that are open. I tested this on a short conversation, not one as long as yours, so:
The beta build is in the repo now. If you already have the beta installed, flatpak install --user --from https://hylki.hyprlab.co/flatpak/co.hyprlab.Hylki.Beta.flatpakrefRPM, Debian and AppImage betas: Beta channel. |
|
Thanks for merging it so quickly. I tested 1.48.0-beta.1 (Flatpak) with the 83-message conversation; the memory still blows up, but the picture is different now:
The thread is a Gmail one (IMAP, XOAUTH2): |
|
A likely lead for the |
Problem
Opening a long conversation makes memory grow without bound until the app is killed. With a Gmail thread of 83 messages (each reply quoting the full history, about 50 MB of bodies), Hylki 1.46.1 (Flatpak, Fedora 45) went past 12 to 18 GB within seconds of selecting it;
journalctlshows the scope ending at a14.3G memory peakand the log is full of WebKit's "Blocked script execution in 'about:srcdoc'" lines, one batch per card.Cause
A folded card (#326) hides its frame with
.hylki-folded>:not(.hylki-fbar):not(.hylki-msg-hdr){display:none}, but adisplay:noneiframe still loads and lays out itssrcdoc. So a thread folded down to its newest card still renders every message.Change
card_body: when the card is folded at render time, the frame's document goes indata-hylki-srcdocinstead ofsrcdoc.wake(f)moves it back tosrcdoc(resetting the frame's init flags soinitruns on the real document) when the card opens, fromfoldCardand frompatch_folds.three_cards.html.Printing is unaffected, as it builds its own document.
I have not built or run this locally, so please treat it as a proposal and check it with
cargo testand a long thread.