Skip to content

Conversation

@elenachekhina
Copy link

Copy link
Collaborator

@spajic spajic left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше конкретную версию (lastest на текущий момент), чтобы не было непредсказуемых изменений

Vendor до оптимизаций:
![img.png](before.png)

devtool coverage показывает, что ~60% js не используется
Copy link
Collaborator

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``` АААААА
Copy link
Collaborator

Choose a reason for hiding this comment

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

)))

![img.png](after.png)

## Результаты
в результате оптимизации удалось уменьшить объем загружаемого js на главной странице с 1.0 MB до 448.0 KB и уложиться в бюджет 449.2 KB
Copy link
Collaborator

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
Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 js mad skillz

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