@@ -69,12 +69,12 @@ let init = function() {
6969// time elapse without the instance being used.
7070
7171let destroy = function ( ) {
72- if ( lz4CodecInstance !== undefined ) {
73- console . info (
74- 'uBO: freeing lz4-block-codec instance (%s KB)' ,
75- lz4CodecInstance . bytesInUse ( ) >>> 10
76- ) ;
77- }
72+ // if ( lz4CodecInstance !== undefined ) {
73+ // console.info(
74+ // 'uBO: freeing lz4-block-codec instance (%s KB)',
75+ // lz4CodecInstance.bytesInUse() >>> 10
76+ // );
77+ // }
7878 lz4CodecInstance = undefined ;
7979 textEncoder = textDecoder = undefined ;
8080 ttlCount = 0 ;
@@ -107,7 +107,7 @@ let uint8ArrayFromBlob = function(key, data) {
107107
108108let encodeValue = function ( key , value ) {
109109 if ( ! lz4CodecInstance ) { return ; }
110- let t0 = window . performance . now ( ) ;
110+ // let t0 = window.performance.now();
111111 if ( textEncoder === undefined ) {
112112 textEncoder = new TextEncoder ( ) ;
113113 }
@@ -123,20 +123,20 @@ let encodeValue = function(key, value) {
123123 outputArray [ 5 ] = ( inputSize >>> 8 ) & 0xFF ;
124124 outputArray [ 6 ] = ( inputSize >>> 16 ) & 0xFF ;
125125 outputArray [ 7 ] = ( inputSize >>> 24 ) & 0xFF ;
126- console . info (
127- 'uBO: [%s] compressed %d KB => %d KB (%s%%) in %s ms' ,
128- key ,
129- inputArray . byteLength >> 10 ,
130- outputArray . byteLength >> 10 ,
131- ( outputArray . byteLength / inputArray . byteLength * 100 ) . toFixed ( 0 ) ,
132- ( window . performance . now ( ) - t0 ) . toFixed ( 1 )
133- ) ;
126+ // console.info(
127+ // 'uBO: [%s] compressed %d KB => %d KB (%s%%) in %s ms',
128+ // key,
129+ // inputArray.byteLength >> 10,
130+ // outputArray.byteLength >> 10,
131+ // (outputArray.byteLength / inputArray.byteLength * 100).toFixed(0),
132+ // (window.performance.now() - t0).toFixed(1)
133+ // );
134134 return outputArray ;
135135} ;
136136
137137let decodeValue = function ( key , inputArray ) {
138138 if ( ! lz4CodecInstance ) { return ; }
139- let t0 = window . performance . now ( ) ;
139+ // let t0 = window.performance.now();
140140 if (
141141 inputArray [ 0 ] !== 0x18 || inputArray [ 1 ] !== 0x4D ||
142142 inputArray [ 2 ] !== 0x22 || inputArray [ 3 ] !== 0x04
@@ -152,14 +152,14 @@ let decodeValue = function(key, inputArray) {
152152 textDecoder = new TextDecoder ( ) ;
153153 }
154154 let value = textDecoder . decode ( outputArray ) ;
155- console . info (
156- 'uBO: [%s] decompressed %d KB => %d KB (%s%%) in %s ms' ,
157- key ,
158- inputArray . byteLength >>> 10 ,
159- outputSize >>> 10 ,
160- ( inputArray . byteLength / outputSize * 100 ) . toFixed ( 0 ) ,
161- ( window . performance . now ( ) - t0 ) . toFixed ( 1 )
162- ) ;
155+ // console.info(
156+ // 'uBO: [%s] decompressed %d KB => %d KB (%s%%) in %s ms',
157+ // key,
158+ // inputArray.byteLength >>> 10,
159+ // outputSize >>> 10,
160+ // (inputArray.byteLength / outputSize * 100).toFixed(0),
161+ // (window.performance.now() - t0).toFixed(1)
162+ // );
163163 return value ;
164164} ;
165165
0 commit comments