mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
fix large records saving to RAD
This commit is contained in:
parent
50a7373d00
commit
79fac4cb45
@ -200,7 +200,15 @@
|
||||
try{raw = JSON.stringify(rad.$);
|
||||
}catch(e){ cb("Cannot radisk!"); return }
|
||||
console.STAT && console.STAT(S, +new Date - S, "rad stringified JSON");
|
||||
if(opt.chunk < raw.length && !o.force){ return f.split() }
|
||||
if(opt.chunk < raw.length && !o.force){
|
||||
var c = 0;
|
||||
Radix.map(rad, function(){
|
||||
if(c++){ return true } // more than 1 item
|
||||
});
|
||||
if(c > 1){
|
||||
return f.split();
|
||||
}
|
||||
}
|
||||
f.text = raw;
|
||||
f.write();
|
||||
}
|
||||
@ -272,7 +280,7 @@
|
||||
});
|
||||
})
|
||||
});
|
||||
console.STAT && console.STAT(S, ST - S, "rad check");
|
||||
console.STAT && console.STAT(S, +new Date - S, "rad check");
|
||||
}
|
||||
r.find(key, g.find);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user