measured improvement for the redisplay part is
6 times faster with 1400 users (13 s down to 2s)
3 times faster with 330 resources (3.2s down to 1.2s)
this.listen_query(options.query_uuid);
this.listen_query(options.query_all_uuid, 'all');
this.listen_query(options.query_uuid);
this.listen_query(options.query_all_uuid, 'all');
+ /* an internal buffer for keeping lines and display them in one call to fnAddData */
+ this.buffered_lines = [];
+
/* GUI setup and event binding */
this.initialize_table();
},
/* GUI setup and event binding */
this.initialize_table();
},
line.push(this.checkbox(this.key, record[this.key]));
// XXX Is adding an array of lines more efficient ?
line.push(this.checkbox(this.key, record[this.key]));
// XXX Is adding an array of lines more efficient ?
- this.table.fnAddData(line);
+// this.table.fnAddData(line);
+ this.buffered_lines.push(line)
+ this.table.fnAddData (this.buffered_lines);
+ this.buffered_lines=[];
this.received_all = true;
}, // on_all_query_done
this.received_all = true;
}, // on_all_query_done