Commit Graph

7 Commits

Author SHA1 Message Date
Adam Hathcock cc54b42a70 OL2 (fix): undefer on write (#5127)
* undefer only on write, not download

* fix test and format
2025-07-22 11:41:03 +01:00
Adam Hathcock 67bd1341aa dispose cache as it should (#5119) 2025-07-21 14:59:58 +01:00
Adam Hathcock 477db6ef02 All BatchedQueues should drain when disposed (also adds query string for output: "debug=true") (#5098)
* ensure disposal is correct

* add tests for disposal of batching queue

* fixes for draining disposal

* Update packages/objectloader2/src/queues/batchingQueue.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix comment

* fix tests and build

* add query string inspection of debug parameter

* Update packages/objectloader2/src/queues/batchingQueue.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/core/objectLoader2Factory.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix test

* fix AI

* export getQueryParameter to avoid dup code.  Sandbox uses it too

* add tests for functions

* prettier fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 12:01:27 +01:00
Adam Hathcock 390e587709 Cache By Reference count (#5096)
* we don't want to break eviction checking for first item...continue the check

* always include size when adding

* scan for references and count them...request when found and don't clean up if referenced

* add display of closure calculation

* add always output to sandbox

* formatting fixes

* removed tracking of deferments, moved caching to separate concern and class

* fixed cache checking and simplifed deferment

* add tests for new deferment and cache

* formatting

* Update packages/objectloader2/src/deferment/BaseCache.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/deferment/BaseCache.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/core/objectLoader2.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/core/objectLoader2.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/objectloader2/src/core/objectLoader2.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix AI suggestions

* rename BaseCache to MemoryCache

* use private method

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 11:31:21 +01:00
Adam Hathcock 005b6224d0 adjust waits and actually save the root last (#5056)
* adjust waits and actually save the root last

* Update packages/objectloader2/src/core/objectLoader2.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 11:10:40 +01:00
Adam Hathcock f86893935f Change and fix BatchingQueue implementation (#5044)
* BatchingQueues allowed processing to happen more than one at a time.  Simplify and don't allow this.

* Use proper logging

* clean up and fix tests

* add more batchingqueue tests

* fixed according to AI

* fix: linting issues

* make deferment more intelligent and fix logging

* add to deferment tracking when bulk adding reads

* format

* fix tests
2025-07-10 10:13:58 +01:00
Adam Hathcock c5967a9616 (OL2) move files around to make more sense (#4950)
* Rename to saveBatch

* forgot a file

* first pass of cacheReader

* OL2 tests have infinite timeout

* OL2 refactor works

* fix for tests

* moved/removed types to make a more logical structure

* fixed imports

* rework loop to be in async generator for the expected count

* get rid of pumps and fix test

* lint fix

* redo mermaid diagrams

* add readme section on deferment

* always return root first

* fix linting

* revert the counting

* merge fixes

* remove unused var
2025-06-26 13:28:50 +01:00