diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-12-06 03:41:53 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-12-06 04:18:24 +0300 |
commit | 9708a54b30f8475e60c40d80aa5ec88c26ad8abd (patch) | |
tree | 2739739ac5c2acfabc9b4b22448b80ca0372a0ed /webpack.common.js | |
parent | 9c470ba16b307e417bf0e3d9d59271a126672a37 (diff) |
Offload generation of blurred backgrounds to a worker
Until now the generation of the blurred backgrounds was done in a normal
canvas, so it happened in the main thread and made the UI unresponsive
while the image was being generated. Now, to solve that, the blurred
background is generated in an OffscreenCanvas in a worker (if
supported by the browser).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'webpack.common.js')
-rw-r--r-- | webpack.common.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/webpack.common.js b/webpack.common.js index 42f733aa7..8fd837498 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -7,6 +7,11 @@ module.exports = { entry: { 'admin-settings': path.join(__dirname, 'src', 'mainAdminSettings.js'), 'collections': path.join(__dirname, 'src', 'collections.js'), + // There is a "worker-loader" plugin for Webpack, but I was not able to + // get it to work ("publicPath" uses "output.publicPath" rather than the + // one set in the plugin + // https://github.com/webpack-contrib/worker-loader/issues/281). + 'image-blurrer-worker': path.join(__dirname, 'src', 'utils/imageBlurrerWorker.js'), 'talk': path.join(__dirname, 'src', 'main.js'), 'talk-files-sidebar': [ path.join(__dirname, 'src', 'mainFilesSidebar.js'), |