Skip to content

Use StringBuilders to build backup display lines#95

Merged
mtkennerly merged 1 commit intomtkennerly:masterfrom
darklinkpower:sbBuildLines
Jul 13, 2025
Merged

Use StringBuilders to build backup display lines#95
mtkennerly merged 1 commit intomtkennerly:masterfrom
darklinkpower:sbBuildLines

Conversation

@darklinkpower
Copy link
Contributor

Pretty minor thing that I noticed could be improved, even if the real effect could be negligible. Previously it was creating a new string object for each segment addition, whereas using a stringbuilder is faster, efficient and uses less memory.

Comment on lines 168 to +170
var parts = backup.Comment.Split();

foreach (var part in backup.Comment.Split())
foreach (var part in parts)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops 😅

@mtkennerly
Copy link
Owner

Thanks!

@mtkennerly mtkennerly merged commit cc09da8 into mtkennerly:master Jul 13, 2025
2 checks passed
@mtkennerly mtkennerly added this to the v0.18.0 milestone Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments