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

additional speed improvements for webpack #6702

Merged

Conversation

emilia-friedberg
Copy link
Member

WHAT

Delete all the npm packages we weren't actually using in the code; upgrade some additional packages that we use in the webpack config.

WHY

I noticed that we download all the npm packages twice during our deploy process, so reducing the number of those should help reduce our deploy time, as well as reducing the total size of our bundles. Then I updated and cleaned up the loaders we are using in the webpack builds (for instance: a loader that only existed to handle something for a package we weren't actually using). Our asset precompilation using this method went down to 756.29s, so a little more than a minute faster than the previous PR (832s), and the total deploy time is now 17 minutes, compared to 21 in the PR with the webpack improvements and 25-30 prior to that. Progress!

HOW

I started trying to just update some of the loaders we use in the webpack builds, and in the process I noticed that we had a lot of packages that just weren't getting used at all, so I updated the ones we were using, removed the ones we weren't, and then did a lot of testing on sprint to make sure I didn't break the website.

Screenshots

N/A

PR Checklist Your Answer
Have you added and/or updated tests? N/A
Have you deployed to Staging? YES
Self-Review: Have you done an initial self-review of the code below on Github? YES
Design Review: If applicable, have you compared the coded design to the mockups? N/A

@emilia-friedberg emilia-friedberg changed the base branch from develop to feat/upgrade-webpack September 4, 2020 19:30
Copy link
Contributor

@cissyxyu cissyxyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress!!

@emilia-friedberg emilia-friedberg merged commit 9d43683 into feat/upgrade-webpack Sep 9, 2020
@delete-merged-branch delete-merged-branch bot deleted the feat/other-ways-to-speed-up-build branch September 9, 2020 19:02
emilia-friedberg added a commit that referenced this pull request Sep 9, 2020
* try committing changes

* fix memory issue

* memory update for prod-cms call

* additional speed improvements for webpack (#6702)

* Remove references to prefilledText in all LMS apps (#6693)

* remove prefill question

* new test snapshot

* Remove leftover unused write to Firebase (#6695)

* try committing everything but yarn lock

* put expose loader back because it turns out we do need that

* minor c hange so I can deploy again

* Add a "last_active" trait to Schools when syncing Vitally

This trait is calculated by the last time a student completed an activity assigned by a teacher at this school

* Remove an extraneous leftover line

* dumb

* add check for empty questions array (#6694)

* Fix some caching issues in the CMS (#6697)

* Fix some caching issues in the CMS

* Break out of module to ensure Response called.

* Be more specific with our `maximum` call to disambiguate

* remove commented out loaders

* Add analytics.group calls if current_user.school exists

* Tweak tests to account for in-memory vs in-db time precision

* Fix the two most common LessonsServer errors and add tests. (#6707)

* Install jest.

* Add tests for createSession

* Fix error with teacher_ids (#6710)

Co-authored-by: cissyxyu <57366100+cissyxyu@users.noreply.github.com>
Co-authored-by: Anathomical <thomas.robertson@quill.org>
Co-authored-by: Eric Adams <erictayloradams@gmail.com>
Co-authored-by: dandrabik <dandrabik@users.noreply.github.com>

* final round of improvements to our current prod webpack build (#6713)

* Remove references to prefilledText in all LMS apps (#6693)

* remove prefill question

* new test snapshot

* Remove leftover unused write to Firebase (#6695)

* try committing everything but yarn lock

* put expose loader back because it turns out we do need that

* minor c hange so I can deploy again

* Add a "last_active" trait to Schools when syncing Vitally

This trait is calculated by the last time a student completed an activity assigned by a teacher at this school

* Remove an extraneous leftover line

* dumb

* add check for empty questions array (#6694)

* Fix some caching issues in the CMS (#6697)

* Fix some caching issues in the CMS

* Break out of module to ensure Response called.

* Be more specific with our `maximum` call to disambiguate

* remove commented out loaders

* Add analytics.group calls if current_user.school exists

* Tweak tests to account for in-memory vs in-db time precision

* bunch of clean up in the webpack files

* run terser plugin in parallel

* start using the cache-loader for jsx and tsx files

* tiny change to deploy again

* get rid of cache-loader

* Fix the two most common LessonsServer errors and add tests. (#6707)

* Install jest.

* Add tests for createSession

* just remove sass-loader from evaluating .css files

* Fix error with teacher_ids (#6710)

* add the hard source webpack plugin

* re-install terser webpack plugin

* whitespace change to redeploy

* get rid of stuff that really isn't helping

Co-authored-by: cissyxyu <57366100+cissyxyu@users.noreply.github.com>
Co-authored-by: Anathomical <thomas.robertson@quill.org>
Co-authored-by: Eric Adams <erictayloradams@gmail.com>
Co-authored-by: dandrabik <dandrabik@users.noreply.github.com>

Co-authored-by: cissyxyu <57366100+cissyxyu@users.noreply.github.com>
Co-authored-by: Anathomical <thomas.robertson@quill.org>
Co-authored-by: Eric Adams <erictayloradams@gmail.com>
Co-authored-by: dandrabik <dandrabik@users.noreply.github.com>
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.

5 participants