macOS pty reads cap at 1 KiB, and batching reads fixed Ghostty's terminal throughput
A developer found that reads from a macOS pseudo-terminal return only 1,024 bytes each, regardless of the buffer size requested, while a pipe returns 65,536 bytes per read. Testing a small Python script on macOS 26.7.1 confirmed the fixed read size across repeated runs. The writer was also blocked far longer when a single thread both read and parsed output than when reading and parsing ran on separate threads. The tests point to this ceiling as the cause of the speed gains Ghostty 1.4 reported, which the author did not verify directly. The benchmarks cited are the maintainers' own figures, showing 25% to 55% higher I/O throughput on macOS.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in