Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance: improve image loading #227

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

jakerenzella
Copy link

Change

Starts work on some approaches to improve the initial load time of the frontend by converting image assets to webp at build time.

Change reason

Currently, the initial load time of the CSESOC website sits at about 5 seconds, mainly loading the large, non-optimised assets in the carousel. There's a few issues here, the images aren't web-optimised, and it seems the is carousel blocking rendering below-the-fold of the site until all images have downloaded.

Screen Shot 2022-03-18 at 10 53 14 pm

There are a few ways to solve this:

  1. Approach started in this PR adds a build step to the Vue site via a webpack plugin to optimise the assets (compressing + converting to webp). Some of the individual images are ~2MB each.
  2. Further enhancement and optimisations can be made, such as lazy loading the images (so as to not block rendering as they load) - no work on this has been commenced but is a good idea for someone to look into.
  3. Pre-optimise your assets as webp (easy, but can be addressed by point 1 with less long-term effort).

Once complete, load times should drastically improve.

Comments

This is a draft PR and implements the basic tools required to do this, however I'm not a Vue expert and there are a few small things blocking progress (such as not being able to solve the webp files, which makes sense as they are not yet generated). Someone with more Vue experience should be able to take this and continue.

If you all are happy with this direction I am happy to continue contributing (but I will be slow).

@Varun-Sethu
Copy link
Member

Hey Jake, thanks for the PR and the time you've put into it! We never noticed the really long load times and we're happy to continue the PR from here if you're short on time, otherwise we'd be grateful if you continued. Please feel free to reach out if you have any questions.

@jakerenzella
Copy link
Author

jakerenzella commented Mar 22, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants