[Bug 69142] FileResourceSet allocates unnecessary Strings

2024-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69142 --- Comment #4 from Christopher Schultz --- We could keep track of both the "appended" string as well as the trimmed string. That is, in the case where the path does not end in a "/" we could keep the "naked" path and re-use it later instead of

[Bug 69142] FileResourceSet allocates unnecessary Strings

2024-06-20 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69142 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug 69142] FileResourceSet allocates unnecessary Strings

2024-06-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69142 --- Comment #2 from John Engebretson --- Good catch! I wrote a fix, unit test, and speed test, and discovered that the corrected logic performs comparably to the old. In short, my proposed fix is more complicated than current but performance

[Bug 69142] FileResourceSet allocates unnecessary Strings

2024-06-19 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69142 --- Comment #1 from Christopher Schultz --- The code is not equivalent. For reference, the original code: Line 82if (path.charAt(path.length() - 1) != '/') { 83path = path + '/'; 84} 85 86if (webAppMount.sta