Skip to content

Commit 5a74313

Browse files
author
splis
committed
speed up and memory leak fix
1 parent d2e016e commit 5a74313

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/brainchop/mainMeshNetFunctions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4151,6 +4151,7 @@ class SequentialConvLayer {
41514151
// Important to avoid "undefined" class var members inside the timer.
41524152
// "this" has another meaning inside the timer.
41534153

4154+
// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
41544155
//document.getElementById("progressBarChild").parentElement.style.visibility = "visible";
41554156

41564157
return new Promise((resolve, reject) => {
@@ -4208,14 +4209,16 @@ class SequentialConvLayer {
42084209
if(chIdx == (self.outChannels -1)) {
42094210

42104211
window.clearInterval( seqTimer );
4211-
//document.getElementById("progressBarChild").style.width = 0 + "%";
4212+
// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
4213+
// document.getElementById("progressBarChild").style.width = 0 + "%";
42124214
tf.dispose(outB);
42134215
const endTime = performance.now();
42144216
const executionTime = endTime - startTime;
42154217
console.log(`Execution time for output layer: ${executionTime} milliseconds`);
42164218
resolve(outC);
42174219
}
42184220
chIdx++;
4221+
// *** WARNING!!! if you uncomment this line the memory leak will break webGL and may reboot your machine
42194222
//document.getElementById("progressBarChild").style.width = (chIdx + 1)*100/self.outChannels + "%";
42204223
}, 10);
42214224
});

0 commit comments

Comments
 (0)