From 414503d63bd2f944b4d3d983ffbe836db7467095 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Fri, 17 Feb 2017 02:42:44 -0300 Subject: [PATCH] add comment about optimization --- lib/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/index.js b/lib/index.js index 44ec5287..4948a5f6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -44,6 +44,8 @@ rpc.on('session add', data => { store_.dispatch(sessionActions.addSession(data)); }); +// we aggregate all the incoming pty events by raf +// debouncing, to reduce allocation and iterations let req; let objects = {}; rpc.on('session data', ({uid, data}) => {