diff --git a/CMakeLists.txt b/CMakeLists.txt
index 252009a7cd..45b0ce09b9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -406,7 +406,7 @@ if (NOT CMAKE_CROSSCOMPILING)
file(GLOB_RECURSE dependent_files CONFIGURE_DEPENDS "${ROOT_DIR}/resources/${graphics_file}/*")
add_custom_command(
OUTPUT ${output_file}
- COMMAND ./openrct2-cli sprite build "${CMAKE_BINARY_DIR}/${output_file}" "${json_file}"
+ COMMAND ./openrct2-cli sprite build "${CMAKE_BINARY_DIR}/${output_file}" "${json_file}" silent
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
DEPENDS ${dependent_files}
)
diff --git a/distribution/changelog.txt b/distribution/changelog.txt
index c8b284146a..4d6efa006a 100644
--- a/distribution/changelog.txt
+++ b/distribution/changelog.txt
@@ -1,5 +1,6 @@
0.4.32 (in development)
------------------------------------------------------------------------
+- Improved: [#25941] The command line sprite build command is now faster.
0.4.31 (2026-02-01)
------------------------------------------------------------------------
diff --git a/openrct2.targets b/openrct2.targets
index 2da26f6f8e..ec018e3ae8 100644
--- a/openrct2.targets
+++ b/openrct2.targets
@@ -113,7 +113,7 @@
-
@@ -133,7 +133,7 @@
-
@@ -153,7 +153,7 @@
-
@@ -173,7 +173,7 @@
-
diff --git a/src/openrct2/command_line/sprite/SpriteFile.cpp b/src/openrct2/command_line/sprite/SpriteFile.cpp
index 144293b1dc..9aa78ac6b9 100644
--- a/src/openrct2/command_line/sprite/SpriteFile.cpp
+++ b/src/openrct2/command_line/sprite/SpriteFile.cpp
@@ -80,15 +80,13 @@ namespace OpenRCT2::CommandLine::Sprite
// New image will have its data inserted after previous image
uint8_t* newElementOffset = reinterpret_cast(static_cast(Header.totalSize));
Header.totalSize += static_cast(image.Buffer.size());
- Entries.reserve(Header.numEntries);
{
ScopedRelativeSpriteFile scopedRelative(*this);
- Data.reserve(Header.totalSize);
Entries.push_back(image.Element);
Entries.back().offset = newElementOffset;
const auto& buffer = image.Buffer;
- std::copy(buffer.begin(), buffer.end(), std::back_inserter(Data));
+ Data.insert(Data.end(), buffer.begin(), buffer.end());
}
}