‹ Guides

Term uses far less memory v26.5.1+

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

What you may have noticed

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.

What was wrong

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.

Before and after

All numbers are from the same Huawei phone, with the same terminal font (Ubuntu Mono), before and after the fix.

Pinch-zooming the text

Memory used by fonts, with one terminal open:

BeforeFrom 26.5.1
Terminal just opened184 MB40 MB
After 1 pinch461 MB40 MB
After 3 pinches1,099 MB40 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.

Opening and closing a terminal

Total memory used by Term, back on the host list after each round of opening a terminal and closing its tab:

BeforeFrom 26.5.1
Host list, fresh start101 MB99 MB
After 1 round228 MB167 MB
After 3 rounds333 MB161 MB
After 6 rounds497 MB170 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.

What you need to do

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.

Your numbers will differ

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.

If Term still grows for you

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.