jadepeng commented on code in PR #2000:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2000#discussion_r1012708144


##########
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/id/IdUtil.java:
##########
@@ -74,9 +74,7 @@ public static Id readBinString(Object id) {
 
     public static String writeString(Id id) {
         String idString = id.asString();
-        StringBuilder sb = new StringBuilder(1 + idString.length());
-        sb.append(id.type().prefix()).append(idString);
-        return sb.toString();
+        return id.type().prefix() + idString;

Review Comment:
   这里就两个string,用StringBuilder代价更大



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to