UI Performance

Содержание

Слайд 2

Desirable knowledge

JS
Html\css\js
Ajax\jquery
React (optional)

Desirable knowledge JS Html\css\js Ajax\jquery React (optional)

Слайд 3

Code Performance

Code Performance

Слайд 4

Array initialization and benchmark find method

Benchmark for

Benchmark for with double equals

Benchmark

Array initialization and benchmark find method Benchmark for Benchmark for with double
map

Example – data structure

Слайд 5

Throttling in devtools

Throttling in devtools

Слайд 6

Client Performance Techniques

Client Performance Techniques

Слайд 7

Debounce

Debounce

Слайд 8

Simple JS

JS with WebWorker

WebWorker

Simple JS JS with WebWorker WebWorker

Слайд 9

Head

Async

Defer

Defer\Async and head

Head Async Defer Defer\Async and head

Слайд 10

Network deceleration in devtools

Network deceleration in devtools

Слайд 11

Preconnect example

Resource Hints: prefetch, preconnect

Preconnect – prepare requests in advance, e.g find

Preconnect example Resource Hints: prefetch, preconnect Preconnect – prepare requests in advance,
dns, make tcp handshake
Prefetch – load resources after page load finished
Other: preload, dns-prefetch

Слайд 12

Techniques

JS uglify example

Minification via build tools

JS minification
Styles minification
Html minification
JS Tree-shaking
Image compression or

Techniques JS uglify example Minification via build tools JS minification Styles minification
compression with significant quality loose
Bundling
Gzip content before send from server

Слайд 13

Techniques

HTTP Cache Headers Example

Minification via reducing response data

CDN
Code-splitting (lazy load js\css)
Paging
Return only needed

Techniques HTTP Cache Headers Example Minification via reducing response data CDN Code-splitting
data in response
HTTP Cache Headers

Слайд 14

Service Worker for HTTPS

Service Worker for HTTPS

Слайд 15

Techniques

Animation

Reduce size and dom changing
Use requestAnimationFrame
Try to be in 16ms frame
Use ccs

Techniques Animation Reduce size and dom changing Use requestAnimationFrame Try to be
animation
Use dom layers

Слайд 16

Change size

Use requestAnimationFrame

Animation Examples

CSS animation

Change size Use requestAnimationFrame Animation Examples CSS animation

Слайд 17

Performance tab

Performance tab

Слайд 18

Dom Layers

Dom Layers

Слайд 19

Mind Tricks

Mind Tricks

Слайд 20

Mind Tricks rules in UI

Что бы разница была заметна, нужна разница в

Mind Tricks rules in UI Что бы разница была заметна, нужна разница
20% времени - Закон Вебера
Как можно быстрее перевести пользователя из пассивного ожидания в активное
1.25 sec for interaction (3sec for 3G)
100ms response and user response

Слайд 21

Mind Tricks techniques in UI

Lazy loading
Prediction
SSR

Mind Tricks techniques in UI Lazy loading Prediction SSR

Слайд 24

Client

SSR

SSR

Client SSR SSR

Слайд 26

Docs and Links

https://www.smashingmagazine.com/2016/12/front-end-performance-checklist-2017-pdf-pages/
https://medium.com/reloading/javascript-start-up-performance-69200f43b201
https://www.youtube.com/watch?v=HlKijvTa_h0
https://www.youtube.com/watch?v=ghcfHBEe1u4
https://www.youtube.com/watch?v=Tiv_9uweA7w
https://www.youtube.com/watch?v=lgPs_hnIA_M
https://www.youtube.com/watch?v=i9cOoipvST8&feature=youtu.be&list=PL8sJahqnzh8JST_ZwTcGG1FHGgKBMcpn6
https://www.youtube.com/watch?v=7-d3O-7aus0
https://www.sitepoint.com/check-css-animation-performance-with-the-browsers-dev-tools/
http://www.html5rocks.com/ru/tutorials/workers/basics/
https://www.searchengines.ru/ispolzovanie-preload-prefetch-i-preconnect.html
https://learn.javascript.ru/external-script
https://www.searchengines.ru/ispolzovanie-preload-prefetch-i-preconnect.html
https://developer.mozilla.org/ru/docs/Web/API/Service_Worker_API/Using_Service_Workers
https://css-tricks.com/the-difference-between-throttling-and-debouncing/
https://learn.javascript.ru/js-animation

Docs and Links https://www.smashingmagazine.com/2016/12/front-end-performance-checklist-2017-pdf-pages/ https://medium.com/reloading/javascript-start-up-performance-69200f43b201 https://www.youtube.com/watch?v=HlKijvTa_h0 https://www.youtube.com/watch?v=ghcfHBEe1u4 https://www.youtube.com/watch?v=Tiv_9uweA7w https://www.youtube.com/watch?v=lgPs_hnIA_M https://www.youtube.com/watch?v=i9cOoipvST8&feature=youtu.be&list=PL8sJahqnzh8JST_ZwTcGG1FHGgKBMcpn6 https://www.youtube.com/watch?v=7-d3O-7aus0 https://www.sitepoint.com/check-css-animation-performance-with-the-browsers-dev-tools/
Имя файла: UI-Performance.pptx
Количество просмотров: 22
Количество скачиваний: 0