refactor(core): improve backend code by flow idea suggests by jadepeng · Pull Request #2000 · apache/hugegraph
| StringBuilder sb = new StringBuilder(1 + idString.length()); | ||
| sb.append(id.type().prefix()).append(idString); | ||
| return sb.toString(); | ||
| return id.type().prefix() + idString; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should warn if it influence the performance. some suggestions are not perf friendly
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里就两个string,用StringBuilder代价更大
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也是, 而且高版本 JDK 编译器似乎已经会自动判断开销转换了. (当然我不确定是从 JDK 几开始的)
imbajin previously approved these changes Nov 7, 2022
@jadepeng you can use git rebase and git push -f to update the code
@jadepeng you can use
git rebaseandgit push -fto update the code
The github UI will alert update with the master automatically (I have clicked it)
It is safer and doesn't need to review the code again (avoid unnecessary manual rebase operations)
TODO: I'll enable the required in CI after all package renamed
zyxxoo previously approved these changes Nov 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
