Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New implementation of proxyMap and proxySet with performance improvem…
…ents (#965) * pushing up to get more eyes on it * added test for snapshot * taking a break * taking a break * removing extra set methods for now * sealed proxied obects * got all tests to pass * got rid of comma * got rid of set tests in utils folder * update version after update * updated to allow values to be keys * updated to allow values to be keys * updated package.json scripts * 2.0.1 * changing brances so storing attempts * updates * fixed get * added return type to fix types on snapshot * added this.data.length in has method * updated has to only show this.data.map if key doesn't exist * updated has to only show this.data.map if key doesn't exist * changed has to check if it's in a snapshot * remove getVersion - doesn't work * added back in canProxy * imported canProxy from valtio * removed unneeded functions and checks that are done in valtio core * changed canProxy * pushing up for proxyMap testing * removed unused file * updated proxyMap to use sparse array * removed use of internal map * added proxySet * moved proxySet to be the main one * added old proxySet in for reference * fixed proxySet * made proxyMap get set and delete consistent * better syntax for maybeProxify * added benchmarks for proxyMap * added benchmarks for proxySet * removed deno from lock file * removed all test files * updated maybeproxify in proxySet * pnpm frozen lockfile * change autoinstall peers to true in pnpm-lock * changed vitest.config.mts to ts * changed version number back and updated import paths to be relative * fixed toJSON to remain in order and proxified keys in .has() for proxyMap * tested set vs filter on empty slots * fixed pnpm lock file * ran pnpm install * auto-install-peers fix * added isSnapshot function for better readability * removed unused package * removed linked package in package.json * fixed lock file * changed to isProxy with this context * Update src/vanilla/utils/proxyMap.ts Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com> * pushing up for testing * pushing up for testing * fixed delete, has and get * fixed delete, has and get * uploading newest changes * uploading newest changes * reverting * fixed import in test file * updated to use nextIndex * put nextIndex on the object itself * added undefined values to initialization * updated entries check * changed nextIndex to use local var * cached indexMap.has to index * removed unneeded index.has call * added this.nextIndex * replaced this.data.length with this.nextIndex * refactor * updated initial data and initial next data * added filled proxyMap and new benchmark * benchmark minSize * Revert "benchmark minSize" This reverts commit 91206eb. * compare 3 * compare 3 * keyVal * new keyval * minor optimization * added MIN_DATA_SIZE constant * move keyval * revert some changes * rename * removed old benchmarks and added vitest benchmarks for proxyMap * fixed lock file * added ts extension for older versions of ts in test file * changed MapIterator to IterableIterator * no longer importing with .ts extension * no longer importing with .ts extension * proxySet changes and added keyvals solution * removed ts extension from imports in proxySet and proxyMap-indexMap-keyvals * fixed toJSON in proxySet * change MapIterator to IterableIterator * add tree1 impl * got lock file from main * fixing lock file * added ts extensions backf * removed test example * extensions added back * recreating lockfile * reverting changes for website lockfile and todo-with-proxyMap lockfile * removed ts extension from proxyMap.bench.ts * reverted changes for lockfile and package.json * removed old btree implementation * changed MapIterator to IterableIterator * incomplete rawMap impl * a minor fix * fix? * export them properly * rename a little bit * revert default * fixed size issue * removed unneeded copy of key-vals * snap map * just to avoid warnings * an improvement to rawMap1, not sure if it works * enumerable size * Revert "enumerable size" This reverts commit 5acaed0. * hack with _registerSnap * added benchmarks * do not enumerate index * added snap registry to keyval * fixed index check * added snap awareness to proxySet * added snap test to proxySet * fix * removed variations * removed subscribes in proxyMap * recover tree1 -> tree2 * fix a bug * added old file for reference * tree2 impl * refactor * bench tree2 * tests * updated proxySet * refactor proxyMap&Set * removed test file * merged branch and got to merge status * removed todo comment * added review suggestions * added review suggestions for proxySet as well * avoid maybeProxify * no need to add key in this data * removed isProxy check on has calls * removed maybeProxify from proxySet * added back in maybeProxify to proxySet * refactor --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com> Co-authored-by: daishi <daishi@axlight.com>
- Loading branch information