Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit dd171a2e authored by deuce's avatar deuce

Handle huge datasets better by calling js.gc(false) and flattening strings.

parent 9b1cf58c
......@@ -45,12 +45,15 @@ function get_posts_by(name, subs)
if(hdr.from.toLowerCase()==name.toLowerCase()) {
body=mb.get_msg_body(true, i, false, false, false).split(/\r?\n/);
for(j=0; j<body.length; j++) {
if(all[body[j]] !== undefined) {
body.splice(j,1);
j--;
continue;
}
all[body[j]]='';
try {
if(all[body[j]] !== undefined) {
body.splice(j,1);
j--;
continue;
}
all[body[j]]='';
js.gc(false);
} catch (e) { log("Out of memory "+e); }
}
body=word_wrap(body.join('\n', 65535)).split(/\n/);
for(j=body.length-1; j>=body.length/2; j--) {
......@@ -72,8 +75,10 @@ function get_posts_by(name, subs)
continue;
if(body[j].search(/ "Real Fact" #[0-9]+:/)!=-1)
break;
if(body[j].search(/s*[\w]{0,2}[>:] /)==-1)
if(body[j].search(/s*[\w]{0,2}[>:] /)==-1) {
txt += body[j]+' ';
js.flatten_string(txt);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment