Open Bug 869826 Opened 12 years ago Updated 2 years ago

nslocalFilewin optimize string

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

People

(Reporter: alfredkayser, Unassigned)

References

Details

(Keywords: memory-footprint, perf)

In nsLocalFileWin.cpp, I would replace: 738 if (filename.Last() == L'/' || filename.Last() == L'\\') 739 filename.AppendASCII("*"); 740 else 741 filename.AppendASCII("\\*"); 742 743 filename.ReplaceChar(L'/', L'\\'); with: filename.ReplaceChar(L'/', L'\\'); if (filename.Last() != L'\\') filename.Append('\\'); filename.Append('*'); Also 1395 mWorkingPath.Append(NS_LITERAL_STRING("\\") + node); is to be replaced with: mWorkingPath.Append('\\'); mWorkingPath.Append(node); (instead of constructing two new strings (NS_LIT and "+"), just add one char and the node string directly).
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.