Subject: 28.0.50; pdumper dumping causes way too many syscalls

From: Pip Cet <[email-masked]>
Date: Tue, 2 Mar 2021 20:33:42 +0000

Playing around with the WebAssembly port, I noticed that pdumper, in
creating the dump file, makes way too many syscalls: it uses
emacs_write(), not fwrite(), so these calls translate to actual
syscalls and context switches. On immature systems (or in special
circumstances like a device mounted synchronously), they might
actually cause a hardware write for each syscall, which would wear out
flash quickly and be generally wasteful.

I've looked into the problem, and it seems easy to solve and worth it
in terms of debuggability and performance.

Patch will be attached once this has a bug number.