mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-29 19:10:13 -06:00
JS: Change Chunk.p.ref to allow inlining
Not sure why the old code did not get inlined correctly. With this change `ref` no longer shows up in my profile. (It was the hottest function before.)
This commit is contained in:
@@ -16,11 +16,7 @@ export default class Chunk {
|
||||
}
|
||||
|
||||
get ref(): Ref {
|
||||
if (this._ref) {
|
||||
return this._ref;
|
||||
} else {
|
||||
return this._ref = Ref.fromData(this.data);
|
||||
}
|
||||
return this._ref || (this._ref = Ref.fromData(this.data));
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user