more mem optimizations: poly length/area. worker now cleans up widget groups

This commit is contained in:
Stewart Allen 2021-06-18 22:57:30 -04:00
commit fdfce594d4
4 changed files with 24 additions and 9 deletions

View file

@ -2872,7 +2872,7 @@
complete = {};
UI.back.style.display = '';
UI.render.style.display = '';
// KIRI.work.clear();
KIRI.client.clear();
STACKS.clear();
hideSlider();
updateSpeeds();

View file

@ -123,6 +123,10 @@
}
});
return bounds;
},
clear: function() {
groups.length = 0;
}
};

View file

@ -47,6 +47,7 @@ KIRI.worker = {
current.print = null;
dispatch.group = wgroup = {};
dispatch.cache = wcache = {};
KIRI.Widget.Groups.clear();
send.done({ clear: true });
},
@ -162,6 +163,8 @@ KIRI.worker = {
slice: function(data, send) {
send.data({update:0.001, updateStatus:"slicing"});
current.print = null;
let settings = data.settings,
widget = wcache[data.id],
last = time(),