mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
add TODOs comments
This commit is contained in:
parent
f7c02e237f
commit
f659dc8e49
@ -672,8 +672,17 @@ var filterDocument = (function() {
|
|||||||
this.disconnect();
|
this.disconnect();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: possibly improve buffer growth, if benchmarking shows it's
|
// TODO:
|
||||||
// worth it.
|
// - 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 ( filterer.buffer === null ) {
|
||||||
if ( streamJobDone(filterer, ev.data) ) { return; }
|
if ( streamJobDone(filterer, ev.data) ) { return; }
|
||||||
filterer.buffer = new Uint8Array(ev.data);
|
filterer.buffer = new Uint8Array(ev.data);
|
||||||
|
Loading…
Reference in New Issue
Block a user