refactor(core): improve backend code by flow idea suggests#2000
refactor(core): improve backend code by flow idea suggests#2000javeme merged 2 commits intoapache:masterfrom
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.
should warn if it influence the performance. some suggestions are not perf friendly
There was a problem hiding this comment.
这里就两个string,用StringBuilder代价更大
There was a problem hiding this comment.
也是, 而且高版本 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
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.