add TODOs comments

This commit is contained in:
Raymond Hill 2017-12-30 11:21:23 -05:00
parent f7c02e237f
commit f659dc8e49
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 11 additions and 2 deletions

View File

@ -672,8 +672,17 @@ var filterDocument = (function() {
this.disconnect();
return;
}
// TODO: possibly improve buffer growth, if benchmarking shows it's
// worth it.
// TODO:
// - Possibly improve buffer growth, if benchmarking shows it's worth
// it.
// - Also evaluate whether keeping a list of buffers and then decoding
// them in sequence using TextDecoder's "stream" option is more
// efficient. Can the data buffers be safely kept around for later
// use?
// - Informal, quick benchmarks seem to show most of the overhead is
// from calling TextDecoder.decode() and TextEncoder.encode(), and if
// confirmed, there is nothing which can be done uBO-side to reduce
// overhead.
if ( filterer.buffer === null ) {
if ( streamJobDone(filterer, ev.data) ) { return; }
filterer.buffer = new Uint8Array(ev.data);