implemented small lookup buffer. This heavily improves lookups for slow databases
This commit is contained in:
@@ -403,16 +403,12 @@ module.exports = function (Y /* :any */) {
|
||||
}
|
||||
}
|
||||
requestTransaction (makeGen/* :any */, callImmediately) {
|
||||
if (false || callImmediately) { // TODO: decide whether this is ok or not..
|
||||
this.waitingTransactions.push(makeGen)
|
||||
if (!this.transactionInProgress) {
|
||||
this.transactionInProgress = true
|
||||
this.waitingTransactions.push(makeGen)
|
||||
if (!this.transactionInProgress) {
|
||||
this.transactionInProgress = true
|
||||
if (true || callImmediately) { // TODO: decide whether this is ok or not..
|
||||
this.transact(this.getNextRequest())
|
||||
}
|
||||
} else {
|
||||
this.waitingTransactions.push(makeGen)
|
||||
if (!this.transactionInProgress) {
|
||||
this.transactionInProgress = true
|
||||
} else {
|
||||
var self = this
|
||||
setTimeout(function () {
|
||||
self.transact(self.getNextRequest())
|
||||
|
||||
Reference in New Issue
Block a user