Closed tkurki closed 2 weeks ago
One of the most prevalent Node/V8 performance tips is https://web.dev/speed-v8/#therefore
On my modern Mac signalk-server settles at about 39 k deltas per second, playing back n2k-from-file full blast.
With this change
exports.parseActisense = (input) => { const [ timestamp, prio, pgn, src, dst, len, ...data ] = input.split(',') return { prio: Number(prio), pgn: Number(pgn), dst: Number(dst), src: Number(src), format: 'Actisense', data: Buffer.from(data.join(''), 'hex'), len: Number(len), timestamp } // return buildMsg( // buildCanId(prio, pgn, dst, src), // 'Actisense', // Buffer.from(data.join(''), 'hex'), // { len: Number(len), timestamp }, // ) }
it manages 47 k deltas/s - quite a difference! An artificial benchmark, with no clients etc, but still.
One of the most prevalent Node/V8 performance tips is https://web.dev/speed-v8/#therefore
On my modern Mac signalk-server settles at about 39 k deltas per second, playing back n2k-from-file full blast.
With this change
it manages 47 k deltas/s - quite a difference! An artificial benchmark, with no clients etc, but still.