Pinch-zooming and opening terminals used to make Term's memory climb and never come back down. From 26.5.1 it stays flat.
Available in Term v26.5.1 and later.
Written
Some of you told us Term got heavier the longer you used it — especially after resizing the text with a pinch, or after opening and closing a lot of terminals. You were right. Each of those left a little memory behind that Term never gave back, and it added up.
On a phone that matters. The system closes apps that use a lot of memory when they are in the background, so a Term that had grown large was more likely to be closed while you were in another app — and a closed app means your sessions reconnect when you come back.
Term draws your terminal with the font you picked. Every time the text size changed, and every time a terminal opened, Term loaded another copy of that font into memory — and the old copies were never released. A pinch gesture changes the size many times over, so a few pinches were enough to stack up dozens of copies.
Term now loads each font once and reuses it at every size. Switching to a different font lets the old one go.
All numbers are from the same Huawei phone, with the same terminal font (Ubuntu Mono), before and after the fix.
Memory used by fonts, with one terminal open:
| Before | From 26.5.1 | |
|---|---|---|
| Terminal just opened | 184 MB | 40 MB |
| After 1 pinch | 461 MB | 40 MB |
| After 3 pinches | 1,099 MB | 40 MB |
Before, that 1.1 GB was still being held a minute later with the phone sitting idle. Now zooming in and out changes nothing: the fonts take the same 40 MB at every size.
Total memory used by Term, back on the host list after each round of opening a terminal and closing its tab:
| Before | From 26.5.1 | |
|---|---|---|
| Host list, fresh start | 101 MB | 99 MB |
| After 1 round | 228 MB | 167 MB |
| After 3 rounds | 333 MB | 161 MB |
| After 6 rounds | 497 MB | 170 MB |
| After 15 rounds | — | 166 MB |
Before, every round after the first added about 55 MB, and none of it came back. Now the first terminal you open costs its memory once, and after that the number holds steady no matter how many times you open and close.
Nothing but update. The fix is in Term 26.5.1 and applies to every font — the built-in Iosevka Term, the fonts you download, and the system font. There is nothing to turn on.
These are measurements from one phone with one font. Ubuntu Mono is one of the smaller fonts in the list; with a larger font each copy was larger too, so the memory saved is bigger, not smaller. What should hold on any device is the shape: before, memory climbed with every zoom and every terminal; now it doesn't.
Tell us what you were doing when it happened — which screen, which font, how long it had been open. This fix came out of exactly that kind of report.