Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@live-change/framework

Package Overview
Dependencies
Maintainers
1
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/framework - npm Package Compare versions

Comparing version 0.3.29 to 0.3.30

31

lib/runtime/SearchIndexer.js

@@ -8,3 +8,3 @@

const bucketSize = 25 //6
const bucketSize = 256
const saveStateThrottle = 2000

@@ -64,2 +64,4 @@ const saveStateDelay = saveStateThrottle + 200

this.readingMore = true
this.lastStateSave = 0

@@ -133,11 +135,10 @@ this.saveStateTimer = null

}
this.queueWritePromise = new Promise((resolve, reject) => {
this.queueWriteResolve = { resolve, reject }
})
const operations = this.queue
if(operations.length == 0) {
console.log("NO OPERATIONS")
this.lastUpdateId = this.queueLastUpdateId
return
}
this.queueWritePromise = new Promise((resolve, reject) => {
this.queueWriteResolve = { resolve, reject }
})
const queueResolve = this.queueWriteResolve

@@ -209,6 +210,9 @@ this.queueWriteResolve = null

this.queueLastUpdateId = lastUpdateId
//console.log("WRITE OPS!")
await this.doWrite()
//console.log("OPS WRITTEN!")
}
observeMore() {
this.readingMore = true
if(this.observable) this.observable.unobserve(this)

@@ -222,14 +226,17 @@ this.observable = this.dao.observable(

}
tryObserveMore() {
if(!this.readingMore && this.observable.list.length == bucketSize) {
this.observeMore()
}
}
async set(ops) {
this.readingMore = false
console.log("SET", this.lastUpdateId, ops.length)
await this.applyOps(ops)
if(this.observable.list.length == bucketSize) {
this.observeMore()
}
this.tryObserveMore()
}
async putByField(_fd, id, op, _reverse, oldObject) {
this.readingMore = false
await this.applyOps([ op ])
if(this.observable.list.length == bucketSize) {
this.observeMore()
}
this.tryObserveMore()
}

@@ -246,3 +253,5 @@

}])
console.log("OPS", ops.length)
await this.applyOps(ops)
console.log("OPS APPLIED", ops.length)
} while(ops.length >= bucketSize)

@@ -249,0 +258,0 @@ }

{
"name": "@live-change/framework",
"version": "0.3.29",
"version": "0.3.30",
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc