mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 10:40:20 +03:00
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:
@@ -735,7 +735,7 @@ void ProjectBuildManager::cancelRun() {
|
||||
mProcessRun->kill();
|
||||
}
|
||||
|
||||
ProjectBuildConfiguration ProjectBuildManager::getConfig() const {
|
||||
const ProjectBuildConfiguration& ProjectBuildManager::getConfig() const {
|
||||
return mConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ class ProjectBuildManager {
|
||||
|
||||
void cancelRun();
|
||||
|
||||
ProjectBuildConfiguration getConfig() const;
|
||||
const ProjectBuildConfiguration& getConfig() const;
|
||||
|
||||
void setConfig( const ProjectBuildConfiguration& config );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user