GithubHelp home page GithubHelp logo

teleginzhenya / shri2018-2-performance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from newbfg/shri2018-2-performance

0.0 1.0 0.0 6.9 MB

Домашка для темы performance

CSS 28.08% HTML 51.86% JavaScript 19.52% Shell 0.53%

shri2018-2-performance's Introduction

Оптимизируйте страницу, выложите на GitHub Pages. Зайдите на https://shri-performance.ru и отправьте урл своей страницы.

Срок сдачи - до 31.10.2018 включительно.

Описание

В этой секции будет представлен список «улучшений», которые помогли и не помогли улучшить перфоманс:

Демо и финальная версия

🥉 3-ее место, когда-то был первый
third place

Помогло:

  • Удалил React и все связанное с ним, ноду перенес в html
  • Убрал лишние ноды из html, такие как #root и .stats
  • Удалил ненужные стили, которые отследил через Coverage в дев тулзах
  • Заинлайнил стили :tada:, инлайнил непосредстввенно перед дивкой с классом, стили для модалки вставил в конце
  • Картинки из модалок заинлайнил в css
  • Остальные картинки подружаю через <link rel="preload">
  • Оптимизировал svg через svgo
  • sh.webp сначала оптимизировал png, потом сконвертировал в webp
  • Оптимизировал все картинки через image-webpack-loader
  • Минифицировал js и подгружаю через <script src="s.js" async>
  • Удалил все остальные символы из шрифтов, кроме Привет, Геннадий из PT Sans и +19 +23 из PT Sans Narrow :P
  • Шрифты подгружаю через rel="preload", так же добавил crossorigin аттрибут
  • Удалил banner :P

Не помогло или перфоманс упал:

  • Service Worker для кеширования
  • Асинхронная подргузка css для модалки через <link rel="preload" href="./modal.css" as="style" onload="this.rel='stylesheet'"> и через <link rel="prefetch" href="./modal.css" as="style" onload="this.rel='stylesheet'">
  • Вставка css через асинхронный js
  • Вынос css в отдельный файл
  • Танцы с бубном

Очень крутое задание :) Спасибо большое, было интересно!

shri2018-2-performance's People

Contributors

newbfg avatar teleginzhenya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.