Merge pull request #115 from NicolasPelletier/master
Speed up file logging for high rate of logging.
This commit is contained in:
commit
a15a628311
@ -1,4 +1,5 @@
|
|||||||
var events = require('events'),
|
var events = require('events'),
|
||||||
|
Dequeue = require('dequeue'),
|
||||||
util = require('util');
|
util = require('util');
|
||||||
|
|
||||||
module.exports = BufferedWriteStream;
|
module.exports = BufferedWriteStream;
|
||||||
@ -6,7 +7,7 @@ module.exports = BufferedWriteStream;
|
|||||||
function BufferedWriteStream(stream) {
|
function BufferedWriteStream(stream) {
|
||||||
var that = this;
|
var that = this;
|
||||||
this.stream = stream;
|
this.stream = stream;
|
||||||
this.buffer = [];
|
this.buffer = new Dequeue();
|
||||||
this.canWrite = false;
|
this.canWrite = false;
|
||||||
this.bytes = 0;
|
this.bytes = 0;
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
"lib": "lib"
|
"lib": "lib"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "0.1.15"
|
"async": "0.1.15",
|
||||||
|
"dequeue": "1.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vows": "0.6.2",
|
"vows": "0.6.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user