From bda286c7f090d1420d35aa5e38039daa5e92ec5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Sat, 25 Mar 2023 12:01:02 +0100 Subject: [PATCH] perf(files): less verbose MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files/src/components/FileEntry.vue | 5 +---- webpack.common.js | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue index 4d7582216f4..412ac44fee2 100644 --- a/apps/files/src/components/FileEntry.vue +++ b/apps/files/src/components/FileEntry.vue @@ -346,7 +346,6 @@ export default Vue.extend({ // Check if we already have this preview cached const isCached = await this.isCachedPreview(this.previewUrl) if (isCached) { - logger.debug('Preview already cached', { fileId: this.source.attributes.fileid, backgroundFailed: this.backgroundFailed }) this.backgroundImage = `url(${this.previewUrl})` this.backgroundFailed = false return @@ -357,14 +356,12 @@ export default Vue.extend({ }, fetchAndApplyPreview() { - logger.debug('Fetching preview', { fileId: this.source.attributes.fileid }) this.img = new Image() this.img.onload = () => { this.backgroundImage = `url(${this.previewUrl})` } - this.img.onerror = (a, b, c) => { + this.img.onerror = () => { this.backgroundFailed = true - logger.error('Failed to fetch preview', { fileId: this.source.attributes.fileid, a, b, c }) } this.img.src = this.previewUrl }, diff --git a/webpack.common.js b/webpack.common.js index 3a33915d027..4d61ded36dc 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -172,6 +172,9 @@ module.exports = { inlineWorkboxRuntime: true, sourcemap: false, + // Increase perfs with less logging + disableDevLogs: true, + // Define runtime caching rules. runtimeCaching: [{ // Match any preview file request