]> git.eshelyaron.com Git - emacs.git/commit
Avoid some tiny /proc file reads
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Jul 2025 19:52:43 +0000 (12:52 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:49:06 +0000 (10:49 +0200)
commit592e092ca39225b5640c575520c21902008eec54
treeb22dfac409b3aac7e59efccf704f3aaed831e654
parent7fca630411ef36553eaa3db23bcb1803dfa647bf
Avoid some tiny /proc file reads

* src/fileio.c (union read_non_regular):
New members buf and bufsize replace inserted and trytry.
(read_non_regular): Adjust to this new, simpler interface.
(Finsert_file_contents): If the gap is smaller than read_buf
and we want to read more than the gap, read into read_buf
first, to avoid lots of tiny reads from /proc files.

(cherry picked from commit c3f96d20eecdf0aa93f294a4f3fb96e16eec6a68)
src/fileio.c