-
Notifications
You must be signed in to change notification settings - Fork 57
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
Task 6 #98
base: master
Are you sure you want to change the base?
Task 6 #98
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ 💪
uses: actions/checkout@v3 | ||
|
||
- name: Run sitespeed.io | ||
uses: docker://sitespeedio/sitespeed.io:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше конкретную версию (lastest на текущий момент), чтобы не было непредсказуемых изменений
Vendor до оптимизаций: | ||
 | ||
|
||
devtool coverage показывает, что ~60% js не используется |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 угнетающая история конечно, загрузили чисто 60% ненужного чего-то
```JavaScript Transfer Size with value 452.2 KB limit max 449.2 KB``` | ||
|
||
у chartjs-color тоже есть зависимости, одна из них chartjs-color-string, уберем их (!/chartjs-color/.test(module.context)): | ||
```JavaScript Transfer Size with value 452.1 KB limit max 449.2 KB``` АААААА |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
)))
 | ||
|
||
## Результаты | ||
в результате оптимизации удалось уменьшить объем загружаемого js на главной странице с 1.0 MB до 448.0 KB и уложиться в бюджет 449.2 KB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
в результате оптимизации удалось уменьшить объем загружаемого js на главной странице с 1.0 MB до 448.0 KB и уложиться в бюджет 449.2 KB | ||
|
||
## Защита от регрессии производительности | ||
Для защиты от потери достигнутого прогресса при дальнейших изменениях программы был настроен CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
return module.context && module.context.indexOf('node_modules') !== -1 | ||
return module.context && | ||
module.context.indexOf('node_modules') !== -1 && | ||
!/chart|moment|color-name|color-convert/.test(module.context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 js mad skillz
CI: https://github.com/elenachekhina/rails-optimization-task6/actions/runs/13884193376