mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 19:30:43 +00:00
Templates from 64 KiB up to 1 MiB were staged in a second buffer and copied again into the thread block. Proving those bytes readable, then copying them into the block that is already zeroed, avoids that buffer and still maps nothing when the template cannot be read. Smaller templates and templates of 1 MiB or more keep the single staged read, which measured as fast or faster. Signed-off-by: devil8blade <360741796+devil8blade@users.noreply.github.com>