Separate looted currency and preserve growing realm state in atomic chunks
Core tests / core (push) Successful in 49s
Core tests / core (push) Successful in 49s
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
// Bound each SQL value to at most 512 KiB of UTF-8; preserve all resident history.
|
||||
export function splitState(state:unknown){const text=JSON.stringify(state),chunks:string[]=[];for(let i=0;i<text.length;){let end=Math.min(i+120000,text.length);const c=text.charCodeAt(end-1);if(c>=0xd800&&c<=0xdbff)end--;chunks.push(text.slice(i,end));i=end;}return chunks;}
|
||||
Reference in New Issue
Block a user