]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0151: blob_from_string() is slow for long strings v9.2.0151
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Fri, 13 Mar 2026 17:36:34 +0000 (17:36 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 13 Mar 2026 17:36:34 +0000 (17:36 +0000)
commit475d6e2f1d72cd8520ab2d2b317ae2ff20777303
tree6f47c819a33e9020bd0ac81d7788f84c2718eb9f
parent7c8168aa0a2bf026014d7b1b4224887ab9b5c4e6
patch 9.2.0151: blob_from_string() is slow for long strings

Problem:  blob_from_string() is slow for long strings
Solution: Use ga_grow() to allocate memory once, perform a bulk copy
          with mch_memmove() then translate NL to NUL in-place
          (Yasuhiro Matsumoto).

closes: #19665

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/strings.c
src/version.c