# HG changeset patch # User drewp@bigasterisk.com # Date 1685398648 25200 # Node ID 1b7cde922c3db3b8595cdea6d8559092092883f3 # Parent dd9474bef2a658ab811599a6a69a795d33722b88 save some work diff -r dd9474bef2a6 -r 1b7cde922c3d light9/web/SyncedGraph.ts --- a/light9/web/SyncedGraph.ts Mon May 29 15:16:57 2023 -0700 +++ b/light9/web/SyncedGraph.ts Mon May 29 15:17:28 2023 -0700 @@ -51,7 +51,10 @@ this.cachedFloatValues = new Map(); // s + '|' + p -> number this.cachedUriValues = new Map(); // s + '|' + p -> Uri - this._applyPatch(patchToDeleteEntireGraph(this.graph)); + const p = patchToDeleteEntireGraph(this.graph); + if (!p.isEmpty()) { + this._applyPatch(p); + } // if we had a Store already, this lets N3.Store free all its indices/etc this.graph = new N3.Store(); this.rebuildPrefixFuncs(this.prefixes);