Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ptugger committed Jun 26, 2023
1 parent f159cf3 commit e7013d4
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions app/frontend/src/components/designer/FormViewerMultiUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,60 +335,20 @@ export default {
//Check if Used Heap size is beyond 70% of Limit
return heapLimit >= heapUsed * 0.7;
},
// formatBytes(bytes, decimals = 2) {
// if (!+bytes) return '0 Bytes';
// const k = 1024;
// const dm = decimals < 0 ? 0 : decimals;
// const sizes = [
// 'Bytes',
// 'KiB',
// 'MiB',
// 'GiB',
// 'TiB',
// 'PiB',
// 'EiB',
// 'ZiB',
// 'YiB',
// ];
// const i = Math.floor(Math.log(bytes) / Math.log(k));
// return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
// },
checkMemoryUsage() {
//console.group();
if (window.performance && window.performance.memory) {
const memory = window.performance.memory;
/*console.log(
' Memory Usage: Used JS Heap: ' +
this.formatBytes(memory.usedJSHeapSize) +
' .'
);
console.log(
' Memory Usage: Total JS Heap: ' +
this.formatBytes(memory.totalJSHeapSize) +
' .'
);
console.log(
' Memory Usage: Limit JS Heap: ' +
this.formatBytes(memory.jsHeapSizeLimit) +
' .'
);*/
if (
this.isMemoryExcessed(memory.jsHeapSizeLimit, memory.usedJSHeapSize)
) {
//having memory leakage so let's add some more time to clear garbage.
this.delay(500);
}
} else {
} /*else {
console.log(
'Memory usage information is not available in this browser.'
);
}
//console.groupEnd();
}*/
},
async validate(element, errors) {
await this.delay(500);
Expand Down

0 comments on commit e7013d4

Please sign in to comment.