drop chunk size again - too tight

pull/391/head
Gordon Williams 2020-05-07 10:19:57 +01:00
parent 0541a66640
commit 20ddb0cb44
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ var AppInfo = {
} else {
let code = storageFile.content;
// write code in chunks, in case it is too big to fit in RAM (fix #157)
var CHUNKSIZE = 8192;
var CHUNKSIZE = 4096;
storageFile.cmd = `\x10require('Storage').write(${JSON.stringify(storageFile.name)},${toJS(code.substr(0,CHUNKSIZE))},0,${code.length});`;
for (var i=CHUNKSIZE;i<code.length;i+=CHUNKSIZE)
storageFile.cmd += `\n\x10require('Storage').write(${JSON.stringify(storageFile.name)},${toJS(code.substr(i,CHUNKSIZE))},${i});`;