Files
node/lib
Chris Dickinson 91586661c9 stream: switch _writableState.buffer to queue
In cases where many small writes are made to a stream
lacking _writev, the array data structure backing the
WriteReq buffer would greatly increase GC pressure.

Specifically, in the fs.WriteStream case, the
clearBuffer routine would only clear a single WriteReq
from the buffer before exiting, but would cause the
entire backing array to be GC'd. Switching to [].shift
lessened pressure, but still the bulk of the time was
spent in memcpy.

This replaces that structure with a linked list-backed
queue so that adding and removing from the queue is O(1).
In the _writev case, collecting the buffer requires an
O(N) loop over the buffer, but that was already being
performed to collect callbacks, so slowdown should be
neglible.

PR-URL: https://github.com/joyent/node/pull/8826
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-18 09:39:05 -08:00
..
2014-09-29 12:32:42 -07:00
2011-03-14 17:37:05 -07:00
2014-09-09 17:15:50 +01:00
2014-10-08 02:24:32 -07:00
2011-03-14 17:37:05 -07:00
2014-06-11 20:41:12 -07:00
2013-03-28 13:19:08 -07:00
2014-11-26 12:16:56 -08:00
2014-12-05 04:33:26 -08:00
2012-06-28 10:14:03 -07:00
2014-12-05 04:33:26 -08:00
2014-09-16 12:28:47 -07:00
2014-12-16 15:11:50 -08:00