web icon indicating copy to clipboard operation
web copied to clipboard

perf: make routes lazy

Open JammingBen opened this issue 1 year ago • 2 comments

Description

Makes all routes lazy so their components don't get loaded with the initial load, but when navigating to the routes.

The ComponentLoader is basically a component wrapping the route components to display a loading spinner during the loading times.

Related Issue

  • Fixes https://github.com/owncloud/web/issues/10980

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] Technical debt
  • [ ] Tests
  • [ ] Documentation
  • [ ] Maintenance (e.g. dependency updates or tooling)

JammingBen avatar Jun 24 '24 13:06 JammingBen

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

update-docs[bot] avatar Jun 24 '24 13:06 update-docs[bot]

I'm a bit torn here. It adds a bit of complexity while (currently) having near to no impact (Web now loads smaller but more chunks, even resulting in ~10-20ms more initial loading time - however this is not noticable). There might be situations in the future where this would be useful though, e.g. when some route component loads a lot of dependencies.

@kulmann @dschmidt any opinions from your side?

JammingBen avatar Jun 24 '24 13:06 JammingBen

Closing here since we're currently not planing this.

JammingBen avatar Nov 05 '24 08:11 JammingBen