-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(core): improve backend code by flow idea suggests #2000
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2000 +/- ##
============================================
+ Coverage 62.41% 66.38% +3.97%
Complexity 976 976
============================================
Files 482 482
Lines 41450 41449 -1
Branches 5896 5890 -6
============================================
+ Hits 25870 27516 +1646
+ Misses 13034 11232 -1802
- Partials 2546 2701 +155
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/BackendException.java
Outdated
Show resolved
Hide resolved
StringBuilder sb = new StringBuilder(1 + idString.length()); | ||
sb.append(id.type().prefix()).append(idString); | ||
return sb.toString(); | ||
return id.type().prefix() + idString; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里就两个string,用StringBuilder代价更大
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也是, 而且高版本 JDK 编译器似乎已经会自动判断开销转换了. (当然我不确定是从 JDK 几开始的)
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/AbstractCache.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/cache/AbstractCache.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/BackendException.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Condition.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/ConditionQuery.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/query/Query.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinaryEntryIterator.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/IntObjectMap.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/ram/IntObjectMap.java
Outdated
Show resolved
Hide resolved
@jadepeng you can use |
The It is safer and doesn't need to review the code again (avoid unnecessary manual rebase operations) TODO: I'll enable the |
ae5e0b2
to
b681523
Compare
No description provided.