Optimize allocations in project saving and editor rendering

Refactor IniFile storage to keep keys and values in unified SmallVector-backed
records, avoiding parallel vector growth and allocations for common small
configurations.

Use std::string_view by value throughout the IniFile input API to prevent
temporary std::string allocations for keys, value names, paths, and comments.
Write serialized components directly to streams instead of constructing a
temporary string for every line.

Return ProjectBuildConfiguration by const reference to avoid copying it during
project saves, and use inline storage for DocumentView visual lines to avoid
heap allocations while rendering the code editor minimap.

Add IniFile tests covering parsing, mutation, ordered serialization, and a
byte-for-byte ecode project-state round trip.
This commit is contained in:
Martín Lucas Golini
2026-08-13 16:03:04 -03:00
parent 74d9fa660c
commit a2c9adca9a
6 changed files with 264 additions and 228 deletions
+1 -1
View File
@@ -735,7 +735,7 @@ void ProjectBuildManager::cancelRun() {
mProcessRun->kill();
}
ProjectBuildConfiguration ProjectBuildManager::getConfig() const {
const ProjectBuildConfiguration& ProjectBuildManager::getConfig() const {
return mConfig;
}
+1 -1
View File
@@ -326,7 +326,7 @@ class ProjectBuildManager {
void cancelRun();
ProjectBuildConfiguration getConfig() const;
const ProjectBuildConfiguration& getConfig() const;
void setConfig( const ProjectBuildConfiguration& config );