String optimizations

This commit is contained in:
2025-07-30 11:00:57 +02:00
parent f40483873a
commit 00048face4
2 changed files with 46 additions and 28 deletions

View File

@@ -455,7 +455,8 @@ DirectoryNode *DirectoryNode::advanceToNextMP3(const String *currentGlobal)
String DirectoryNode::getDirectoryStructureHTML() const
{
String html;
html.reserve(1024); // Reserve memory for better performance
html.reserve(512);
if (name == "/")
{
html += "<ul>\n";
@@ -487,7 +488,7 @@ void DirectoryNode::appendIndentation(String &html, int level) const
{
for (int i = 0; i < level; i++)
{
html += " ";
html.concat(" ");
}
}