improve CachedGraphTransaction perf by javeme · Pull Request #1743 · apache/hugegraph

@javeme

Change-Id: I9f60f68d2faedb099e89adc2b1c1f4948d177a40

@javeme

Change-Id: I9f60f68d2faedb099e89adc2b1c1f4948d177a40

@codecov

imbajin

public <V> Cache<Id, V> cache(String name, long capacity) {
if (!this.caches.containsKey(name)) {
this.caches.putIfAbsent(name, new RamCache(capacity));
LOG.info("Init RamCache for '{}' with capacity {}",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we use info for it (or use debug) ? like the first time fulfill cache

and RamCache seems not clearly compare to OffHeapCache? (level cache also have this problem)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a frequent action, and just log for 3 cache entrances(cache/offheapCache/levelCache).

RamCache may be renamed HeapCache in the future.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, use HeapCache or InHeapCache is more readable

imbajin

coderzc

@javeme javeme deleted the cache-tx-improve branch

February 15, 2022 05:55