Skip to content

Commit

Permalink
Reduce allocations for field path text during parsing (#7863)
Browse files Browse the repository at this point in the history
Signed-off-by: Mohit Godwani <[email protected]>
  • Loading branch information
mgodwan authored Jun 9, 2023
1 parent 0c1a29a commit 16c9d5e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public void remove() {
}

public String pathAsText(String name) {
if (offset == index) {
return name;
}
sb.setLength(0);
for (int i = offset; i < index; i++) {
sb.append(path[i]).append(DELIMITER);
Expand Down

0 comments on commit 16c9d5e

Please sign in to comment.