From 147cd8618023884b9eb60a79d5efe53abefe9c47 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 24 Mar 2021 18:50:27 -0400 Subject: redid how LinkManager stores links on documents by putting them on the Doc itself instead of as a computedFn. This has a signifcant effect on efficiency since adding a link to one document will no longer invalidate every other view that references *any* document's links --- src/fields/Doc.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 953d96ffa..d0ccce9cf 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -85,6 +85,7 @@ export const DataSym = Symbol("Data"); export const LayoutSym = Symbol("Layout"); export const FieldsSym = Symbol("Fields"); export const AclSym = Symbol("Acl"); +export const DirectLinksSym = Symbol("DirectLinks"); export const AclUnset = Symbol("AclUnset"); export const AclPrivate = Symbol("AclOwnerOnly"); export const AclReadonly = Symbol("AclReadOnly"); @@ -185,6 +186,7 @@ export class Doc extends RefField { @observable private ___fields: any = {}; @observable private ___fieldKeys: any = {}; @observable public [AclSym]: { [key: string]: symbol }; + @observable public [DirectLinksSym]: Set = new Set(); private [UpdatingFromServer]: boolean = false; private [ForceServerWrite]: boolean = false; -- cgit v1.2.3-70-g09d2