Skip to content

Lazy load files sidebar #8755

@juliusknorr

Description

@juliusknorr

The files sidebar of talk is quite a large chunk of javascript that gets loaded and parsed on every page that has the viewer loaded. From the code it seems like there was a dedicated loader at some point but currently web pack just packs them into one entry point: https://github.com/nextcloud/spreed/blob/master/webpack.config.js#L10-L13

It might be feasible to actually split the chunks in a way that the larger components or dependencies are only loaded if the sidebar is actually shown.

https://webpack.js.org/guides/code-splitting/#dynamic-imports

Example from a practical use case with dashboard widgets: https://github.com/nextcloud/activity/pull/1079/files#diff-48b88a3417e903ef4241fa665050d5a5758f387c366ceb6a373ed072e6de150b

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions