Skip to content
Snippets Groups Projects
Commit 8c291e90 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Dramatically speed up response to message base (sub) message list queries

Using MsgBase.get_all_msg_headers() which didn't exist when this module was
originally written.

Also, include "use strict";
parent 8112a144
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
load("sbbsdefs.js"); load("sbbsdefs.js");
load("nodedefs.js"); load("nodedefs.js");
"use strict";
const REVISION = "1.18"; const REVISION = "1.18";
const GOPHER_PORT = client.socket.local_port; const GOPHER_PORT = client.socket.local_port;
...@@ -281,9 +283,10 @@ switch(field[0]) { ...@@ -281,9 +283,10 @@ switch(field[0]) {
); );
writeln(format("0%s\tnull\tnull\tnull\r\n",msginfo)); writeln(format("0%s\tnull\tnull\tnull\r\n",msginfo));
**/ **/
var hdr_list = msgbase.get_all_msg_headers();
first = msgbase.first_msg; first = msgbase.first_msg;
for(i=msgbase.last_msg;i>=first;i--) { for(i=msgbase.last_msg;i>=first;i--) {
hdr=msgbase.get_msg_header(false,i); hdr = hdr_list[i];
if(hdr==null) if(hdr==null)
continue; continue;
if(hdr.attr&MSG_DELETE) if(hdr.attr&MSG_DELETE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment