@fluidframework/matrix 2.0.0-internal.1.1.2 → 2.0.0-internal.1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ import { PermutationVector } from "./permutationvector";
9
9
  * Used by PermutationVector to cache position -\> handle lookups.
10
10
  *
11
11
  * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but
12
- * so far there's no measurable perf penalty for being a separate object (node 12 x64)
12
+ * so far there's no measurable perf penalty for being a separate object (node 12 x64)
13
13
  */
14
14
  export declare class HandleCache implements IVectorConsumer<Handle> {
15
15
  readonly vector: PermutationVector;
@@ -13,7 +13,7 @@ const range_1 = require("./range");
13
13
  * Used by PermutationVector to cache position -\> handle lookups.
14
14
  *
15
15
  * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but
16
- * so far there's no measurable perf penalty for being a separate object (node 12 x64)
16
+ * so far there's no measurable perf penalty for being a separate object (node 12 x64)
17
17
  */
18
18
  class HandleCache {
19
19
  constructor(vector) {
@@ -1 +1 @@
1
- {"version":3,"file":"handlecache.js","sourceRoot":"","sources":["../src/handlecache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BAA+B;AAE/B,+DAAsD;AAEtD,+CAAsD;AAEtD,mCAAsC;AAEtC;;;;;GAKG;AACH,MAAa,WAAW;IAIpB,YAA4B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QAH7C,YAAO,GAAa,EAAE,CAAC;QACvB,UAAK,GAAG,CAAC,CAAC;IAEuC,CAAC;IAE1D;;;OAGG;IACK,QAAQ,CAAC,QAAgB;QAC7B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;OAOG;IACI,SAAS,CAAC,QAAgB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEtC,uFAAuF;QACv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AAC,MAAM,GAAG,KAAK,CAAC;SAC/B;IACL,CAAC;CAGJ;AAjHD,kCAiHC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-bitwise */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IVectorConsumer } from \"@tiny-calc/nano\";\nimport { Handle, isHandleValid } from \"./handletable\";\nimport { PermutationVector, PermutationSegment } from \"./permutationvector\";\nimport { ensureRange } from \"./range\";\n\n/**\n * Used by PermutationVector to cache position -\\> handle lookups.\n *\n * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but\n * so far there's no measurable perf penalty for being a separate object (node 12 x64)\n */\nexport class HandleCache implements IVectorConsumer<Handle> {\n private handles: Handle[] = [];\n private start = 0;\n\n constructor(public readonly vector: PermutationVector) { }\n\n /**\n * Returns the index of the given position in the 'handles' array as a Uint32.\n * (If the position is not in the array, returns an integer greater than 'handles.length').\n */\n private getIndex(position: number) {\n return (position - this.start) >>> 0;\n }\n\n /**\n * Returns the handle currently assigned to the given 'position' (if any). Check\n * the result with 'isValidHandle(..)' to see if a handle has been allocated for\n * the given position.\n *\n * Throws a 'RangeError' if the provided 'position' is out-of-bounds wrt. the\n * PermutationVector's length.\n */\n public getHandle(position: number) {\n const index = this.getIndex(position);\n\n // Perf: To encourage inlining, handling of the 'cacheMiss(..)' case has been extracted\n // to a separate method.\n\n // Perf: A cache hit implies that 'position' was in bounds. Therefore, we can defer\n // checking that 'position' is in bounds until 'cacheMiss(..)'. This yields an\n // ~40% speedup when the position is in the cache (node v12 x64).\n\n return index < this.handles.length\n ? this.handles[index]\n : this.cacheMiss(position);\n }\n\n /** Update the cache when a handle has been allocated for a given position. */\n public addHandle(position: number, handle: Handle) {\n assert(isHandleValid(handle), 0x017 /* \"Trying to add invalid handle!\" */);\n\n const index = this.getIndex(position);\n if (index < this.handles.length) {\n assert(!isHandleValid(this.handles[index]),\n 0x018 /* \"Trying to insert handle into position with already valid handle!\" */);\n this.handles[index] = handle;\n }\n }\n\n /** Used by 'CacheMiss()' to retrieve handles for a range of positions. */\n private getHandles(start: number, end: number) {\n // TODO: This can be accelerated substantially using 'walkSegments()'. The only catch\n // is that\n\n const handles: Handle[] = [];\n const { vector } = this;\n\n for (let pos = start; pos < end; pos++) {\n const { segment, offset } = vector.getContainingSegment(pos);\n const asPerm = segment as PermutationSegment;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n handles.push(asPerm.start + offset!);\n }\n\n return handles;\n }\n\n private cacheMiss(position: number) {\n // Coercing 'position' to an Uint32 allows us to handle a negative 'position' value\n // with the same logic that handles 'position' >= length.\n const _position = position >>> 0;\n\n // TODO: To bound memory usage, there should be a limit on the maximum size of\n // handle[].\n\n // TODO: To reduce MergeTree lookups, this code should opportunistically grow\n // the cache to the next MergeTree segment boundary (within the limits of\n // the handle cache).\n\n if (_position < this.start) {\n this.handles = this.getHandles(_position, this.start).concat(this.handles);\n this.start = _position;\n return this.handles[0];\n } else {\n ensureRange(_position, this.vector.getLength());\n\n this.handles = this.handles.concat(this.getHandles(this.start + this.handles.length, _position + 1));\n return this.handles[this.handles.length - 1];\n }\n }\n\n // #region IVectorConsumer\n\n itemsChanged(start: number, removedCount: number, insertedCount: number): void {\n // If positions were inserted/removed, our current policy is to trim the array\n // at the beginning of the invalidate range and lazily repopulate the handles\n // on demand.\n //\n // Some alternatives to consider that preserve the previously cached handles\n // that are still valid:\n //\n // * Eagerly populate the 'handles[]' with the newly insert values (currently guaranteed\n // to be Handle.unallocated, so we don't even need to look them up.)\n //\n // * Use a sentinel value or other mechanism to allow \"holes\" in the cache.\n\n const index = this.getIndex(start);\n if (index < this.handles.length) {\n this.handles.length = index;\n }\n }\n\n // #endregion IVectorConsumer\n}\n"]}
1
+ {"version":3,"file":"handlecache.js","sourceRoot":"","sources":["../src/handlecache.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BAA+B;AAE/B,+DAAsD;AAEtD,+CA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,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;IACL,CAAC;IAED,0BAA0B;IAE1B,YAAY,CAAC,KAAa,EAAE,YAAoB,EAAE,aAAqB;QACnE,8EAA8E;QAC9E,6EAA6E;QAC7E,aAAa;QACb,EAAE;QACF,4EAA4E;QAC5E,wBAAwB;QACxB,EAAE;QACF,6FAA6F;QAC7F,2EAA2E;QAC3E,EAAE;QACF,gFAAgF;QAEhF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;SAC/B;IACL,CAAC;CAGJ;AAjHD,kCAiHC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-bitwise */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IVectorConsumer } from \"@tiny-calc/nano\";\nimport { Handle, isHandleValid } from \"./handletable\";\nimport { PermutationVector, PermutationSegment } from \"./permutationvector\";\nimport { ensureRange } from \"./range\";\n\n/**\n * Used by PermutationVector to cache position -\\> handle lookups.\n *\n * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but\n * so far there's no measurable perf penalty for being a separate object (node 12 x64)\n */\nexport class HandleCache implements IVectorConsumer<Handle> {\n private handles: Handle[] = [];\n private start = 0;\n\n constructor(public readonly vector: PermutationVector) { }\n\n /**\n * Returns the index of the given position in the 'handles' array as a Uint32.\n * (If the position is not in the array, returns an integer greater than 'handles.length').\n */\n private getIndex(position: number) {\n return (position - this.start) >>> 0;\n }\n\n /**\n * Returns the handle currently assigned to the given 'position' (if any). Check\n * the result with 'isValidHandle(..)' to see if a handle has been allocated for\n * the given position.\n *\n * Throws a 'RangeError' if the provided 'position' is out-of-bounds wrt. the\n * PermutationVector's length.\n */\n public getHandle(position: number) {\n const index = this.getIndex(position);\n\n // Perf: To encourage inlining, handling of the 'cacheMiss(..)' case has been extracted\n // to a separate method.\n\n // Perf: A cache hit implies that 'position' was in bounds. Therefore, we can defer\n // checking that 'position' is in bounds until 'cacheMiss(..)'. This yields an\n // ~40% speedup when the position is in the cache (node v12 x64).\n\n return index < this.handles.length\n ? this.handles[index]\n : this.cacheMiss(position);\n }\n\n /** Update the cache when a handle has been allocated for a given position. */\n public addHandle(position: number, handle: Handle) {\n assert(isHandleValid(handle), 0x017 /* \"Trying to add invalid handle!\" */);\n\n const index = this.getIndex(position);\n if (index < this.handles.length) {\n assert(!isHandleValid(this.handles[index]),\n 0x018 /* \"Trying to insert handle into position with already valid handle!\" */);\n this.handles[index] = handle;\n }\n }\n\n /** Used by 'CacheMiss()' to retrieve handles for a range of positions. */\n private getHandles(start: number, end: number) {\n // TODO: This can be accelerated substantially using 'walkSegments()'. The only catch\n // is that\n\n const handles: Handle[] = [];\n const { vector } = this;\n\n for (let pos = start; pos < end; pos++) {\n const { segment, offset } = vector.getContainingSegment(pos);\n const asPerm = segment as PermutationSegment;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n handles.push(asPerm.start + offset!);\n }\n\n return handles;\n }\n\n private cacheMiss(position: number) {\n // Coercing 'position' to an Uint32 allows us to handle a negative 'position' value\n // with the same logic that handles 'position' >= length.\n const _position = position >>> 0;\n\n // TODO: To bound memory usage, there should be a limit on the maximum size of\n // handle[].\n\n // TODO: To reduce MergeTree lookups, this code should opportunistically grow\n // the cache to the next MergeTree segment boundary (within the limits of\n // the handle cache).\n\n if (_position < this.start) {\n this.handles = this.getHandles(_position, this.start).concat(this.handles);\n this.start = _position;\n return this.handles[0];\n } else {\n ensureRange(_position, this.vector.getLength());\n\n this.handles = this.handles.concat(this.getHandles(this.start + this.handles.length, _position + 1));\n return this.handles[this.handles.length - 1];\n }\n }\n\n // #region IVectorConsumer\n\n itemsChanged(start: number, removedCount: number, insertedCount: number): void {\n // If positions were inserted/removed, our current policy is to trim the array\n // at the beginning of the invalidate range and lazily repopulate the handles\n // on demand.\n //\n // Some alternatives to consider that preserve the previously cached handles\n // that are still valid:\n //\n // * Eagerly populate the 'handles[]' with the newly insert values (currently guaranteed\n // to be Handle.unallocated, so we don't even need to look them up.)\n //\n // * Use a sentinel value or other mechanism to allow \"holes\" in the cache.\n\n const index = this.getIndex(start);\n if (index < this.handles.length) {\n this.handles.length = index;\n }\n }\n\n // #endregion IVectorConsumer\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/matrix";
8
- export declare const pkgVersion = "2.0.0-internal.1.1.2";
8
+ export declare const pkgVersion = "2.0.0-internal.1.2.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/matrix";
11
- exports.pkgVersion = "2.0.0-internal.1.1.2";
11
+ exports.pkgVersion = "2.0.0-internal.1.2.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-internal.1.1.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-internal.1.2.0\";\n"]}
@@ -9,7 +9,7 @@ import { PermutationVector } from "./permutationvector";
9
9
  * Used by PermutationVector to cache position -\> handle lookups.
10
10
  *
11
11
  * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but
12
- * so far there's no measurable perf penalty for being a separate object (node 12 x64)
12
+ * so far there's no measurable perf penalty for being a separate object (node 12 x64)
13
13
  */
14
14
  export declare class HandleCache implements IVectorConsumer<Handle> {
15
15
  readonly vector: PermutationVector;
@@ -10,7 +10,7 @@ import { ensureRange } from "./range";
10
10
  * Used by PermutationVector to cache position -\> handle lookups.
11
11
  *
12
12
  * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but
13
- * so far there's no measurable perf penalty for being a separate object (node 12 x64)
13
+ * so far there's no measurable perf penalty for being a separate object (node 12 x64)
14
14
  */
15
15
  export class HandleCache {
16
16
  constructor(vector) {
@@ -1 +1 @@
1
- {"version":3,"file":"handlecache.js","sourceRoot":"","sources":["../src/handlecache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+BAA+B;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IAIpB,YAA4B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QAH7C,YAAO,GAAa,EAAE,CAAC;QACvB,UAAK,GAAG,CAAC,CAAC;IAE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,wBAAwB;QACxB,EAAE;QACF,6FAA6F;QAC7F,2EAA2E;QAC3E,EAAE;QACF,gFAAgF;QAEhF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;SAC/B;IACL,CAAC;CAGJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-bitwise */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IVectorConsumer } from \"@tiny-calc/nano\";\nimport { Handle, isHandleValid } from \"./handletable\";\nimport { PermutationVector, PermutationSegment } from \"./permutationvector\";\nimport { ensureRange } from \"./range\";\n\n/**\n * Used by PermutationVector to cache position -\\> handle lookups.\n *\n * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but\n * so far there's no measurable perf penalty for being a separate object (node 12 x64)\n */\nexport class HandleCache implements IVectorConsumer<Handle> {\n private handles: Handle[] = [];\n private start = 0;\n\n constructor(public readonly vector: PermutationVector) { }\n\n /**\n * Returns the index of the given position in the 'handles' array as a Uint32.\n * (If the position is not in the array, returns an integer greater than 'handles.length').\n */\n private getIndex(position: number) {\n return (position - this.start) >>> 0;\n }\n\n /**\n * Returns the handle currently assigned to the given 'position' (if any). Check\n * the result with 'isValidHandle(..)' to see if a handle has been allocated for\n * the given position.\n *\n * Throws a 'RangeError' if the provided 'position' is out-of-bounds wrt. the\n * PermutationVector's length.\n */\n public getHandle(position: number) {\n const index = this.getIndex(position);\n\n // Perf: To encourage inlining, handling of the 'cacheMiss(..)' case has been extracted\n // to a separate method.\n\n // Perf: A cache hit implies that 'position' was in bounds. Therefore, we can defer\n // checking that 'position' is in bounds until 'cacheMiss(..)'. This yields an\n // ~40% speedup when the position is in the cache (node v12 x64).\n\n return index < this.handles.length\n ? this.handles[index]\n : this.cacheMiss(position);\n }\n\n /** Update the cache when a handle has been allocated for a given position. */\n public addHandle(position: number, handle: Handle) {\n assert(isHandleValid(handle), 0x017 /* \"Trying to add invalid handle!\" */);\n\n const index = this.getIndex(position);\n if (index < this.handles.length) {\n assert(!isHandleValid(this.handles[index]),\n 0x018 /* \"Trying to insert handle into position with already valid handle!\" */);\n this.handles[index] = handle;\n }\n }\n\n /** Used by 'CacheMiss()' to retrieve handles for a range of positions. */\n private getHandles(start: number, end: number) {\n // TODO: This can be accelerated substantially using 'walkSegments()'. The only catch\n // is that\n\n const handles: Handle[] = [];\n const { vector } = this;\n\n for (let pos = start; pos < end; pos++) {\n const { segment, offset } = vector.getContainingSegment(pos);\n const asPerm = segment as PermutationSegment;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n handles.push(asPerm.start + offset!);\n }\n\n return handles;\n }\n\n private cacheMiss(position: number) {\n // Coercing 'position' to an Uint32 allows us to handle a negative 'position' value\n // with the same logic that handles 'position' >= length.\n const _position = position >>> 0;\n\n // TODO: To bound memory usage, there should be a limit on the maximum size of\n // handle[].\n\n // TODO: To reduce MergeTree lookups, this code should opportunistically grow\n // the cache to the next MergeTree segment boundary (within the limits of\n // the handle cache).\n\n if (_position < this.start) {\n this.handles = this.getHandles(_position, this.start).concat(this.handles);\n this.start = _position;\n return this.handles[0];\n } else {\n ensureRange(_position, this.vector.getLength());\n\n this.handles = this.handles.concat(this.getHandles(this.start + this.handles.length, _position + 1));\n return this.handles[this.handles.length - 1];\n }\n }\n\n // #region IVectorConsumer\n\n itemsChanged(start: number, removedCount: number, insertedCount: number): void {\n // If positions were inserted/removed, our current policy is to trim the array\n // at the beginning of the invalidate range and lazily repopulate the handles\n // on demand.\n //\n // Some alternatives to consider that preserve the previously cached handles\n // that are still valid:\n //\n // * Eagerly populate the 'handles[]' with the newly insert values (currently guaranteed\n // to be Handle.unallocated, so we don't even need to look them up.)\n //\n // * Use a sentinel value or other mechanism to allow \"holes\" in the cache.\n\n const index = this.getIndex(start);\n if (index < this.handles.length) {\n this.handles.length = index;\n }\n }\n\n // #endregion IVectorConsumer\n}\n"]}
1
+ {"version":3,"file":"handlecache.js","sourceRoot":"","sources":["../src/handlecache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+BAA+B;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAU,aAAa,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,OAAO,WAAW;IAIpB,YAA4B,MAAyB;QAAzB,WAAM,GAAN,MAAM,CAAmB;QAH7C,YAAO,GAAa,EAAE,CAAC;QACvB,UAAK,GAAG,CAAC,CAAC;IAEuC,CAAC;IAE1D;;;OAGG;IACK,QAAQ,CAAC,QAAgB;QAC7B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;OAOG;IACI,SAAS,CAAC,QAAgB;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEtC,uFAAuF;QACvF,8BAA8B;QAE9B,oFAAoF;QACpF,qFAAqF;QACrF,uEAAuE;QAEvE,OAAO,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM;YAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YACrB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,8EAA8E;IACvE,SAAS,CAAC,QAAgB,EAAE,MAAc;QAC7C,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAE3E,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,KAAK,GAAG,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AAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;YAEhD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;YACrG,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;SAChD;IACL,CAAC;IAED,0BAA0B;IAE1B,YAAY,CAAC,KAAa,EAAE,YAAoB,EAAE,aAAqB;QACnE,8EAA8E;QAC9E,6EAA6E;QAC7E,aAAa;QACb,EAAE;QACF,4EAA4E;QAC5E,wBAAwB;QACxB,EAAE;QACF,6FAA6F;QAC7F,2EAA2E;QAC3E,EAAE;QACF,gFAAgF;QAEhF,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC;SAC/B;IACL,CAAC;CAGJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-bitwise */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IVectorConsumer } from \"@tiny-calc/nano\";\nimport { Handle, isHandleValid } from \"./handletable\";\nimport { PermutationVector, PermutationSegment } from \"./permutationvector\";\nimport { ensureRange } from \"./range\";\n\n/**\n * Used by PermutationVector to cache position -\\> handle lookups.\n *\n * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but\n * so far there's no measurable perf penalty for being a separate object (node 12 x64)\n */\nexport class HandleCache implements IVectorConsumer<Handle> {\n private handles: Handle[] = [];\n private start = 0;\n\n constructor(public readonly vector: PermutationVector) { }\n\n /**\n * Returns the index of the given position in the 'handles' array as a Uint32.\n * (If the position is not in the array, returns an integer greater than 'handles.length').\n */\n private getIndex(position: number) {\n return (position - this.start) >>> 0;\n }\n\n /**\n * Returns the handle currently assigned to the given 'position' (if any). Check\n * the result with 'isValidHandle(..)' to see if a handle has been allocated for\n * the given position.\n *\n * Throws a 'RangeError' if the provided 'position' is out-of-bounds wrt. the\n * PermutationVector's length.\n */\n public getHandle(position: number) {\n const index = this.getIndex(position);\n\n // Perf: To encourage inlining, handling of the 'cacheMiss(..)' case has been extracted\n // to a separate method.\n\n // Perf: A cache hit implies that 'position' was in bounds. Therefore, we can defer\n // checking that 'position' is in bounds until 'cacheMiss(..)'. This yields an\n // ~40% speedup when the position is in the cache (node v12 x64).\n\n return index < this.handles.length\n ? this.handles[index]\n : this.cacheMiss(position);\n }\n\n /** Update the cache when a handle has been allocated for a given position. */\n public addHandle(position: number, handle: Handle) {\n assert(isHandleValid(handle), 0x017 /* \"Trying to add invalid handle!\" */);\n\n const index = this.getIndex(position);\n if (index < this.handles.length) {\n assert(!isHandleValid(this.handles[index]),\n 0x018 /* \"Trying to insert handle into position with already valid handle!\" */);\n this.handles[index] = handle;\n }\n }\n\n /** Used by 'CacheMiss()' to retrieve handles for a range of positions. */\n private getHandles(start: number, end: number) {\n // TODO: This can be accelerated substantially using 'walkSegments()'. The only catch\n // is that\n\n const handles: Handle[] = [];\n const { vector } = this;\n\n for (let pos = start; pos < end; pos++) {\n const { segment, offset } = vector.getContainingSegment(pos);\n const asPerm = segment as PermutationSegment;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n handles.push(asPerm.start + offset!);\n }\n\n return handles;\n }\n\n private cacheMiss(position: number) {\n // Coercing 'position' to an Uint32 allows us to handle a negative 'position' value\n // with the same logic that handles 'position' >= length.\n const _position = position >>> 0;\n\n // TODO: To bound memory usage, there should be a limit on the maximum size of\n // handle[].\n\n // TODO: To reduce MergeTree lookups, this code should opportunistically grow\n // the cache to the next MergeTree segment boundary (within the limits of\n // the handle cache).\n\n if (_position < this.start) {\n this.handles = this.getHandles(_position, this.start).concat(this.handles);\n this.start = _position;\n return this.handles[0];\n } else {\n ensureRange(_position, this.vector.getLength());\n\n this.handles = this.handles.concat(this.getHandles(this.start + this.handles.length, _position + 1));\n return this.handles[this.handles.length - 1];\n }\n }\n\n // #region IVectorConsumer\n\n itemsChanged(start: number, removedCount: number, insertedCount: number): void {\n // If positions were inserted/removed, our current policy is to trim the array\n // at the beginning of the invalidate range and lazily repopulate the handles\n // on demand.\n //\n // Some alternatives to consider that preserve the previously cached handles\n // that are still valid:\n //\n // * Eagerly populate the 'handles[]' with the newly insert values (currently guaranteed\n // to be Handle.unallocated, so we don't even need to look them up.)\n //\n // * Use a sentinel value or other mechanism to allow \"holes\" in the cache.\n\n const index = this.getIndex(start);\n if (index < this.handles.length) {\n this.handles.length = index;\n }\n }\n\n // #endregion IVectorConsumer\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/matrix";
8
- export declare const pkgVersion = "2.0.0-internal.1.1.2";
8
+ export declare const pkgVersion = "2.0.0-internal.1.2.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/matrix";
8
- export const pkgVersion = "2.0.0-internal.1.1.2";
8
+ export const pkgVersion = "2.0.0-internal.1.2.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-internal.1.1.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-internal.1.2.0\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/matrix",
3
- "version": "2.0.0-internal.1.1.2",
3
+ "version": "2.0.0-internal.1.2.0",
4
4
  "description": "Distributed matrix",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,6 +35,8 @@
35
35
  "stress": "mocha --recursive dist/test/**/*.spec.js --exit -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict --fgrep stress-loop",
36
36
  "test": "npm run test:mocha",
37
37
  "test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml --exit",
38
+ "test:memory": "mocha --config src/test/memory/.mocharc.js",
39
+ "test:memory-profiling:report": "mocha --config src/test/memory/.mocharc.js",
38
40
  "test:mocha": "npm run stress -- --invert",
39
41
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
40
42
  "tsc": "tsc",
@@ -61,26 +63,27 @@
61
63
  "dependencies": {
62
64
  "@fluidframework/common-definitions": "^0.20.1",
63
65
  "@fluidframework/common-utils": "^1.0.0",
64
- "@fluidframework/core-interfaces": "^2.0.0-internal.1.1.2",
65
- "@fluidframework/datastore-definitions": "^2.0.0-internal.1.1.2",
66
- "@fluidframework/merge-tree": "^2.0.0-internal.1.1.2",
67
- "@fluidframework/protocol-base": "^0.1037.1000",
66
+ "@fluidframework/core-interfaces": "^2.0.0-internal.1.2.0",
67
+ "@fluidframework/datastore-definitions": "^2.0.0-internal.1.2.0",
68
+ "@fluidframework/merge-tree": "^2.0.0-internal.1.2.0",
69
+ "@fluidframework/protocol-base": "^0.1038.1000",
68
70
  "@fluidframework/protocol-definitions": "^1.0.0",
69
- "@fluidframework/runtime-definitions": "^2.0.0-internal.1.1.2",
70
- "@fluidframework/runtime-utils": "^2.0.0-internal.1.1.2",
71
- "@fluidframework/shared-object-base": "^2.0.0-internal.1.1.2",
72
- "@fluidframework/telemetry-utils": "^2.0.0-internal.1.1.2",
71
+ "@fluidframework/runtime-definitions": "^2.0.0-internal.1.2.0",
72
+ "@fluidframework/runtime-utils": "^2.0.0-internal.1.2.0",
73
+ "@fluidframework/shared-object-base": "^2.0.0-internal.1.2.0",
74
+ "@fluidframework/telemetry-utils": "^2.0.0-internal.1.2.0",
73
75
  "@tiny-calc/nano": "0.0.0-alpha.5",
74
76
  "tslib": "^1.10.0"
75
77
  },
76
78
  "devDependencies": {
77
- "@fluid-internal/test-dds-utils": "^2.0.0-internal.1.1.2",
78
- "@fluidframework/build-common": "^0.24.0",
79
- "@fluidframework/build-tools": "^0.3.1000",
80
- "@fluidframework/eslint-config-fluid": "^0.28.2000",
79
+ "@fluid-internal/test-dds-utils": "^2.0.0-internal.1.2.0",
80
+ "@fluid-tools/benchmark": "^0.43.0",
81
+ "@fluidframework/build-common": "^1.0.0",
82
+ "@fluidframework/build-tools": "^0.4.4000",
83
+ "@fluidframework/eslint-config-fluid": "^1.0.0",
81
84
  "@fluidframework/matrix-previous": "npm:@fluidframework/matrix@^1.0.0",
82
- "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.1.2",
83
- "@fluidframework/test-runtime-utils": "^2.0.0-internal.1.1.2",
85
+ "@fluidframework/mocha-test-setup": "^2.0.0-internal.1.2.0",
86
+ "@fluidframework/test-runtime-utils": "^2.0.0-internal.1.2.0",
84
87
  "@microsoft/api-extractor": "^7.22.2",
85
88
  "@rushstack/eslint-config": "^2.5.1",
86
89
  "@tiny-calc/micro": "0.0.0-alpha.5",
@@ -15,7 +15,7 @@ import { ensureRange } from "./range";
15
15
  * Used by PermutationVector to cache position -\> handle lookups.
16
16
  *
17
17
  * Perf: Possibly, this should eventually be inlined into PermutationVector itself, but
18
- * so far there's no measurable perf penalty for being a separate object (node 12 x64)
18
+ * so far there's no measurable perf penalty for being a separate object (node 12 x64)
19
19
  */
20
20
  export class HandleCache implements IVectorConsumer<Handle> {
21
21
  private handles: Handle[] = [];
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/matrix";
9
- export const pkgVersion = "2.0.0-internal.1.1.2";
9
+ export const pkgVersion = "2.0.0-internal.1.2.0";