Skip to content

Latest commit

ย 

History

History
373 lines (232 loc) ยท 10.9 KB

PITCHME.md

File metadata and controls

373 lines (232 loc) ยท 10.9 KB

Web Performance

created by BoostCamp_์˜ค์ฃผ์˜ ๋งˆ๋ฒ•์‚ฌ


Index

Why ?

LIGHTHOUSE

OFFSREEN-IMAGES

OPTIMIZE-IMAGES

OVERSIZE-IMAGES

TEXT-COMPRESSION

SPEED-INDEX


Why ?

์—ด์‹ฌํžˆ ํŒ€ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋˜์ค‘..

@[]](์ด๊ฑฐ ๋ฉ”์ธํŽ˜์ด์ง€ ์™œ์ด๋ ‡๊ฒŒ ๋Š๋ ค์กŒ๋ƒ ?)
@[](๋ฉ”์ธ ํŽ˜์ด์ง€๊ฐ€ ๋กœ๋”ฉ๋˜๋Š”๊ฒŒ ๋ˆˆ์— ๋ณด์—ฌ !)
@[](์ด๊ฑฐ ์ข€ ๋ฒ„๋ฒ…๊ฑฐ๋ฆฌ๋Š” ๊ฒƒ ๊ฐ™์ง€ ์•Š๋ƒ ?)
@[](๊ทธ๋ž˜๋„ ๋ฉ”์ธํŽ˜์ด์ง€์ธ๋ฐ.. ์ข€ ๋” ๋นจ๋ž์œผ๋ฉด ์ข‹๊ฒ ์–ด !)
@

Note: ์—ด์‹ฌํžˆ ํŒ€ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•˜๋˜ ๋„์ค‘.. ๊ฐ‘์ž๊ธฐ ๋˜ ๋‹ค๋ฅธ ๊ณผ์ œ๊ฐ€ ๋“ค์ด๋‹ฅ์ณค๋‹ค

+++

์™œ ๋Š๋ ค์ง€๋Š” ๊ฑธ๊นŒ ?

  • Back-End
  • Network
  • Front-End

Steve souders : "์„œ๋น„์Šค ์‘๋‹ต ์‹œ๊ฐ„์˜ 80~90%๋Š” Front-End์—์„œ ์†Œ๋ชจ๋œ๋‹ค"

@[](Front-End ์„ฑ๋Šฅ ํ–ฅ์ƒ = ์ตœ์†Œ๋น„์šฉ ์ตœ๋Œ€ํšจ์œจ!)

+++

๊ทผ๋ฐ ์–ด๋–ป๊ฒŒ ๊ฐœ์„  ํ•ด์•ผํ•˜์ง€ ?

aa6a


lighthouse

LIGHTHOUSE

https://developers.google.com/web/tools/lighthouse

์›น ์•ฑ์˜ ํ’ˆ์งˆ์„ ๊ฐœ์„ ํ•˜๋Š” ์˜คํ”ˆ ์†Œ์Šค ์ง€๋™ํ™” ๋„๊ตฌ

Note: ์ตœ๊ทผ Chrome๋ธŒ๋ผ์šฐ์ €์˜ Developer tool Audits์— ํฌํ•จ๋˜์—ˆ์œผ๋ฉฐ, ๊ฐ€์žฅ ์ตœ๊ทผ์— ๊ตฌ๊ธ€์—์„œ ๊ฐœ๋ฐœํ•œ ํˆด ์ด๋ฏ€๋กœ ๋ฏฟ๊ณ  ์“ฐ์…”๋„ ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค

+++?image=/assets/light-house-exam.png&size=contain

Note: ์ด ํ™”๋ฉด์ด LIGHTHOUSE๊ฐ€ ์›น ํŽ˜์ด์ง€๋ฅผ ๋ถ„์„ํ•œ ๊ฒฐ๊ณผ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ํŽ˜์ด์ง€ ์ž…๋‹ˆ๋‹ค. ์ €ํฌ ํŒ€์€ LIGHTHOUSE ํฌ๋กฌ ์ต์Šคํ…์…˜์„ ํ†ตํ•ด์„œ ๋ถ„์„์„ ํ–ˆ๊ตฌ์š”, ๋ณด์‹œ๋Š” ํ™”๋ฉด์—์„œ Performance ์™€ Best Practice์— ์ดˆ์ ์„ ๋งž์ถฐ ๊ฐœ์„ ์„ ์ง„ํ–‰ ํ–ˆ์Šต๋‹ˆ๋‹ค.

+++

LIGHTHOUSE ์‹คํ–‰ ํ™˜๊ฒฝ

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
Device Emulation Nexus 5X: Enabled
Network Throttling 562.5ms RTT, 1.4Mbps down, 0.7Mbps up: Enabled
CPU Throttling 4x slowdown: Enabled

์›น์€ ๋ชจ๋ฐ”์ผ๋ถ€ํ„ฐ ๋ฐ์Šคํฌํƒ‘๊นŒ์ง€ ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ์„œ๋น„์Šค๋ฉ๋‹ˆ๋‹ค.
๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์ค‘ ์ตœ์•…์˜ ํ™˜๊ฒฝ์—์„œ ํ…Œ์ŠคํŠธ๋ฅผ ๊ฑฐ์น˜๊ณ  ๊ฐœ๋ฐœ์„ ํ•˜๊ฒŒ๋˜๋ฉด,
์›น์„œ๋น„์Šค๋ฅผ ๋” ๋งŽ์€ ์‚ฌ์šฉ์ž๋“ค์—๊ฒŒ ์ œ๊ณตํ•  ์ˆ˜ ์žˆ์„๊ฑฐ๋ผ ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค.


์™œ LIGHTHOUSE ๊ฒฐ๊ณผ์— ๋ณด์ด๋Š” ๊ฒƒ๋“ค์ด ์›น ์„ฑ๋Šฅ์— ์˜ํ–ฅ์„ ๋ฏธ์น ๊นŒ?

@[](๋ถˆํ•„์š”ํ•œ ๋ฆฌ์†Œ์Šค ๋‹ค์šด๋กœ๋“œ) @[](๋ถˆํ•„์š”ํ•œ ๋ฆฌ์†Œ์Šค์˜ ํฌ๊ธฐ) @[](๊ฒฐ๊ณผ์ ์œผ๋กœ ๋ Œ๋”๋ง ์‹œ๊ฐ„์— ์˜ํ–ฅ์„ ๋ฏธ์นจ)


OFFSCREEN-IMAGES

+++

์ฒซ๋ฒˆ์งธ ๊ฐœ์„ 

์„œ๋ฒ„์™€์˜ ์š”์ฒญ ํšŸ์ˆ˜๋ฅผ ์ค„์ด์ž
ํŽ˜์ด์ง€์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฆฌ์†Œ์Šค๋“ค์˜ ํฌ๊ธฐ๋ฅผ ์ค„์ด์ž
ํ™”๋ฉด์— ๋ณด์—ฌ์ง€์ง€ ์•Š๋Š” ๋ฆฌ์†Œ์Šค๋“ค์„ ๋ฏธ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ค์ง€ ๋ง์ž

@[3]
@[](ํ™”๋ฉด์— ๋ณด์—ฌ์ง€์ง€ ์•Š๋Š” ์ด๋ฏธ์ง€๋“ค์„ ๋ฏธ๋ฆฌ ์š”์ฒญํ•˜์ง€ ์•Š๋Š”๋‹ค!)
@[](๊ฐ€์žฅ ๋น ๋ฅด๊ณ  ์ตœ์ƒ์œผ๋กœ ์ตœ์ ํ™”๋œ ๋ฆฌ์†Œ์Šค๋Š” ์ „์†ก๋˜์ง€ ์•Š๋Š” ๋ฆฌ์†Œ์Šค!)

+++

Why?

์ด๋ฏธ์ง€์˜ ๊ฐœ์ˆ˜๊ฐ€ ๋งŽ๊ฑฐ๋‚˜ ์šฉ๋Ÿ‰์ด ํฐ ํŽ˜์ด์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ฌ ๊ฒฝ์šฐ ์“ธ๋ฐ์—†๋Š” ๋„คํŠธ์›Œํฌ ๋น„์šฉ์ด ์ฆ๊ฐ€ํ•˜๋ฏ€๋กœ
์ด๋ฏธ์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๋Š” ๊ณผ์ •์—์„œ ์„œ๋น„์Šค ์†๋„์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ์†Œ์ง€๊ฐ€ ์žˆ์Œ

+++

์ด๋ฏธ์ง€ ๋™์  ๋กœ๋”ฉ

IntersectionObserver API์˜ ํ™œ์šฉ

Observer์— ๋“ฑ๋ก๋œ DOM element๋“ค์ด ํ™”๋ฉด์— ๋‚˜ํƒ€๋‚˜๊ฑฐ๋‚˜ ์‚ฌ๋ผ์งˆ ๋•Œ ๋น„๋™๊ธฐ๋กœ ์ด๋ฒคํŠธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚จ๋‹ค.

function _settingIntersectionObserver() {

    var interectionObserver = new IntersectionObserver
    (function (entries, observer) {
        entries.forEach(function (entry) {
            if (!entry.isIntersecting) {
                return;
            }

            var target = entry.target;
            var $lazyImg = $(target).find('img');

            if ( $lazyImg.data('lazy-img') ){
                var source = $lazyImg.data('lazy-img');
                $lazyImg.attr('src', source);
                $lazyImg.removeAttr('data-lazy-img');

                observer.unobserve(target);
            }

        });
    });

    Array.from($productContainer.find('li.item'))
    .forEach(function (el) {
        interectionObserver.observe(el);
    });
}

@[3](IntesectionObserver ์„ค์ •)
@[10-17, 19](DOM์ด ๋…ธ์ถœ๋˜๋ฉด ์ด๋ฏธ์ง€ ๋กœ๋”ฉ)
@[18](๋ณด์—ฌ์ง„ ์ด๋ฏธ์ง€๋Š” Observer์—์„œ ์ œ๊ฑฐ)
@[24-27](ํ™”๋ฉด์— ๋‚˜ํƒ€๋‚˜๋Š” ๊ฒƒ์„ ๊ฐ์ง€ํ•˜๊ธฐ ์œ„ํ•œ Element๋ฅผ ๋“ฑ๋ก)

Note: ์ด๋ฏธ์ง€ ๋™์  ๋กœ๋”ฉ์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์ฝ”๋“œ๋Š” ํ•ด๋‹น ์—˜๋ฆฌ๋จผํŠธ๊ฐ€ ํ˜„์žฌ ํ™”๋ฉด ๋‚ด์— ๋ณด์ด๋Š”์ง€ ์•Œ์•„๋‚ด๋Š” ๊ฒƒ! ์ด๋ฅผ ์œ„ํ•ด ์—˜๋ฆฌ๋จผํŠธ์˜ ํฌ๊ธฐ์™€ ์œ„์น˜ ๊ฐ’์„ ๋Œ๋ ค์ฃผ๋Š” Element.getBoundingClientRect ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค.
ํ•˜์ง€๋งŒ, ์ด ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ๋งˆ๋‹ค ๋ธŒ๋ผ์šฐ์ €๋Š” ์—˜๋ฆฌ๋จผํŠธ์˜ ํฌ๊ธฐ์™€ ์œ„์น˜๊ฐ’์„ ์ตœ์‹  ์ •๋ณด๋กœ ์•Œ์•„์˜ค๊ธฐ ์œ„ํ•ด ๋ฌธ์„œ์˜ ์ผ๋ถ€ ํ˜น์€ ์ „์ฒด๋ฅผ ๋‹ค์‹œ ๊ทธ๋ฆฌ๊ฒŒ ๋˜๋Š” ๋ฆฌํ”Œ๋กœ์šฐ(reflow) ํ˜„์ƒ์ด ๋ฐœ์ƒํ•œ๋‹ค๋Š” ์ ! ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ์Šคํฌ๋กค ์ด๋ฒคํŠธ, ๋ฆฌ์‚ฌ์ด์ฆˆ ์ด๋ฒคํŠธ์™€ ๊ฐ™์ด ๋ชจ๋“  ์—˜๋ฆฌ๋จผํŠธ๋ฅผ ์ˆœํšŒํ•˜๋ฉด์„œ ํ˜ธ์ถœํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉ์ž interaction ์„ฑ๋Šฅ์ด ๋–จ์–ด ์งˆ ์ˆ˜ ์žˆ๋‹ค.

์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ, ์Šคํฌ๋กค์ด๋‚˜ ๋ฆฌ์‚ฌ์ด์ฆˆ ์ด๋ฒคํŠธ๊ฐ€ ๊ณผ๋„ํ•˜๊ฒŒ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์œผ๋ฏ€๋กœ throttle ๋˜๋Š” debounce ๋“ฑ์„ ์‚ฌ์šฉํ•ด ์‹คํ–‰ ๋นˆ๋„๋ฅผ ์กฐ์ ˆํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜๋Š”, requestAnimationFrame์„ ์ด์šฉํ•ด ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•๋“ค์„ ์‚ฌ์šฉํ–ˆ์—ˆ๋‹ค.

์ด๋Ÿฌํ•œ ๋ฌธ์ œ์ ๋“ค์„ ํ•ด๊ฒฐํ•ด์ค„ IntersectionObserver API๋Š” ์•„์ง ๋ช‡๋ช‡ ๋ธŒ๋ผ์šฐ์ €์˜ ์ตœ์‹  ๋ฒ„์ „์—์„œ๋งŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์ง€๋งŒ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์œ„ํ•ด Polyfill์„ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

+++

์˜ˆ์ƒ์น˜ ๋ชปํ•œ ๊ฒฐ๊ณผ

์ด๋ฏธ์ง€๊ฐ€ ์ฑ„์›Œ์ง€๊ธฐ ์ „ DOMํฌ๊ธฐ๊ฐ€ ๊ธฐ์ค€์ด ๋˜์–ด๋ฒ„๋ฆผ

์ด๋กœ ์ธํ•ด์„œ ์˜ˆ์ƒ๋ณด๋‹ค ๋งŽ์€ ์ด๋ฏธ์ง€๋“ค์ด ๋ถˆ๋ ค์ง

@[](์ด๋ฏธ์ง€์˜ ๋†’์ด์™€ ๋„“์ด๊ฐ€ ๊ณ ์ •์ธ ์ƒํƒœ๋กœ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.)
@[]( ํƒœ๊ทธ์— inline-style๋กœ ๋„“์ด์™€ ๋†’์ด ์ง€์ •)

+++

Before

main-before-offscreen

+++

After

main-after-offscreen

+++

์ด๋ฏธ์ง€ ๋™์  ๋กœ๋”ฉ ์˜ˆ์‹œ

network-example @


Images

์ด๋ฏธ์ง€๋ฅผ ์••์ถ•ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ํฌ๊ฒŒ 2๊ฐ€์ง€ ์ด๋‹ค.

Optimize-images
Oversize-images

@[](์ด๋ฏธ์ง€์˜ ํŒŒ์ผ ํฌ๊ธฐ = ์ด ํ”ฝ์…€ ์ˆ˜ X ๊ฐ ํ”ฝ์…€์„ ์ธ์ฝ”๋”ฉํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ฐ”์ดํŠธ ์ˆ˜)
@[1](์ด๋ฏธ์ง€ ํ”ฝ์…€์„ ์ธ์ฝ”๋”ฉํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ฐ”์ดํŠธ์˜ ์ˆ˜๋ฅผ ์ตœ์ ํ™”ํ•˜๋Š” ๊ฒƒ)
@[2](์ด ํ”ฝ์…€ ์ˆ˜๋ฅผ ์ตœ์ ํ™”ํ•˜๋Š” ๊ฒƒ)


optimize-images

+++

Webp VS other image format

Webp๋Š” ์ง€์›ํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ํ•œ์ •์ ์ด๋‹ค!

<picture>
  <source media="(min-width: 650px)" srcset="img_pink_flowers.jpg">
  <source media="(min-width: 465px)" srcset="img_white_flower.jpg">
  <img src="img_orange_flowers.jpg" alt="Flowers" style="width:auto;">
</picture>

@[](์ง€์›ํ•˜๋Š” ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์œ„ํ•ด์„œ ์‚ฌ์šฉํ•˜๋Š” picture Element Tag)


oversize-images

+++

์‹ค์ œ ์ด๋ฏธ์ง€๊ฐ€ ํฐ๋ฐ, ๋ณด์ด๋Š” ๋ทฐ๋Š” ์ž‘์€ ์ผ€์ด์Šค

over-size-image @

+++

ํŒŒ์ผ ์—…๋กœ๋“œ ํ• ๋•Œ์—, ์ด๋ฏธ์ง€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ฆฌ์‚ฌ์ด์ง• ์ง„ํ–‰, large, middle, small ๋“ฑ ํ”„๋กœ์ ํŠธ์— ์ ์šฉ ํ• ๋งŒํ•œ ์‚ฌ์ด์ฆˆ๋กœ ๋ฆฌ์‚ฌ์ด์ง• ํ•˜๊ณ , Before After ๋น„๊ต

Header์— Content Distposition: attachment; ํ—ค๋”๊ฐ€ ๋‚ด๋ ค์˜ค๋Š” ์ด์œ ??

---?image=/assets/webpack.png&size=contain

TEXT-COMPRESSION

+++

์ฒซ๋ฒˆ์งธ ๊ฐœ์„ 

์„œ๋ฒ„์‚ฌ์ด๋“œ ๋ Œ๋”๋ง ์ ์šฉ
์„œ๋ฒ„์™€์˜ ์š”์ฒญ ํšŸ์ˆ˜๋ฅผ ์ค„์ด์ž
ํŽ˜์ด์ง€์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๋ฆฌ์†Œ์Šค๋“ค์˜ ํฌ๊ธฐ๋ฅผ ์ค„์ด์ž
์•ˆ๋ณด์ด๋Š” ๋ฆฌ์†Œ์Šค๋“ค์„ ๋ฏธ๋ฆฌ ๋ถˆ๋Ÿฌ์˜ค์ง€ ๋ง์ž

@[2-3] @[](์„œ๋ฒ„์‚ฌ์ด๋“œ ๋ Œ๋”๋ง์€ ๋‹ค์Œ ๊ธฐํšŒ์—.)

Note: FE ๊ฐœ์„ ์„ ๋ฐฉํ–ฅ์œผ๋กœ ์žก์•˜๊ธฐ์— ์„œ๋ฒ„์‚ฌ์ด๋“œ ๋ Œ๋”๋ง์„ ์ œ์™ธํ•˜๊ณ , ๋‚˜๋จธ์ง€๋ฅผ ์ฐจ๋ก€๋Œ€๋กœ ์ง„ํ–‰ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

+++

Before

  • ๋ฆฌ์†Œ์Šค ํฌ๊ธฐ : 500KB ์ด์ƒ
  • ์‹œ๊ฐ„ : 500ms ์ด์ƒ

main-before-network

Note: ๊ฐœ์„ ํ•˜๊ธฐ ์ด์ „์— ์š”์ฒญํ•˜๋Š” ๋„คํŠธ์›Œํฌ ํŒŒ์ผ์š”์†Œ๋“ค์ด ์ด๋ ‡๊ฒŒ ๋งŽ๋„ค์š”..

+++

After

  • ๋ฆฌ์†Œ์Šค ํฌ๊ธฐ : 180KB
  • ์‹œ๊ฐ„ : 37ms

main-after-network

๋ฆฌ์†Œ์Šค ํฌ๊ธฐ ์•ฝ 64% ๊ฐ์†Œ, ์‹œ๊ฐ„ ์•ฝ 92% ์ ˆ์•ฝ!

@[](์™ธ์ณ ๊ฐ“ํŒฉ!)

Note: ๊ฐœ์„ ํ•˜๊ธฐ๋ฅผ ์ง„ํ–‰ํ•˜๊ณ ๋‚˜์„œ ๋ฆฌ์†Œ์Šค์˜ ํฌ๊ธฐ๋Š” 64%๊ฐ์†Œํ•˜์˜€๊ณ , ์‹œ๊ฐ„์€ ์•ฝ 90%์ •๋„ ์ ˆ์•ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.


speed-index

์ผ๋ฐ˜์ ์œผ๋กœ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๋กœ๋“œ ์ด๋ฒคํŠธ์— ๋„๋‹ฌ ํ•  ๋•Œ๊นŒ์ง€์˜ ์‹œ๊ฐ„์˜ ํ‰๊ท 
์ฆ‰, ํŽ˜์ด์ง€์˜ ๋ณด์ด๋Š” ๋ถ€๋ถ„์ด ํ‘œ์‹œ๋˜๋Š” ํ‰๊ท  ์‹œ๊ฐ„์ž…๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ ์‹ค์ œ ์‚ฌ์šฉ์ž๊ฐ€ ํ™”๋ฉด์—์„œ ์ฃผ์š” ์ปจํ…์ธ ๋ฅผ ๋Š๋‚„ ์ˆ˜ ์žˆ๋Š” ๋กœ๋“œ ์‹œ์ ์€ ์•„๋‹ ์ˆ˜๋„ ์žˆ๋‹ค.

+++

speed-index-exam

Note : ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉ์ž๊ฐ€ ์ปจํ…์ธ ๋ฅผ ๋Š๋ผ๋Š” ์‹œ์ ์€ ๋‘ ์˜ˆ์ œ์—์„œ ๋‹ค๋ฅด๊ฒŒ ๋‚˜ํƒ€๋‚œ๋‹ค. ์ฒซ๋ฒˆ์งธ๋Š” ์ ์ฐจ์ ์œผ๋กœ ์ฝ˜ํ…์ธ ๊ฐ€ ๋กœ๋”ฉ์ด ๋˜์ง€๋งŒ, ๋‘๋ฒˆ์งธ๋Š” ์ ์ง„์ ์ธ ๋ Œ๋”๋ง์ด ์ด๋ฃจ์–ด์ง€์ง€ ์•Š๊ณ  ํ•œ๋ฒˆ์— ๋กœ๋“œ๊ฐ€ ๋œ๋‹ค. ์ด๋Š” ํฐ ์ฐจ์ด๊ฐ€ ์žˆ์œผ๋ฉฐ ํ›„์ž๊ฐ€ speedindex๊ฐ€ ์ตœ์ ํ™” ๋˜์ง€ ์•Š์•˜์Œ์„ ๋‚˜ํƒ€๋‚ด๊ธฐ๋„ ํ•œ๋‹ค.

+++

์–ด๋–ป๊ฒŒ speed index๋ฅผ ์ตœ์ ํ™” ํ•  ์ˆ˜ ์žˆ๋‚˜?

  • ์ฝ˜ํ…์ธ  ํšจ์œจ์„ฑ ์ตœ์ ํ™”
  • ์ฃผ์š” ๋ Œ๋”๋ง ๊ฒฝ๋กœ ์ตœ์ ํ™”

+++

์ฝ˜ํ…์ธ  ํšจ์œจ์„ฑ ์ตœ์ ํ™”

๋ถˆํ•„์š”ํ•œ ๋‹ค์šด๋กœ๋“œ๋ฅผ ์ œ๊ฑฐ
๋‹ค์–‘ํ•œ ์••์ถ• ๊ธฐ์ˆ ์„ ํ†ตํ•ด ๊ฐ ๋ฆฌ์†Œ์Šค์˜ ์ „์†ก ์ธ์ฝ”๋”ฉ์„ ์ตœ์ ํ™”
์บ์‹ฑ ํ™œ์„ฑํ™”

@[1](offsreen images) @[2](optimize images, oversize images, text compression) @[3](content caching)

+++

์ฃผ์š” ๋ Œ๋”๋ง ๊ฒฝ๋กœ ์ตœ์ ํ™”

Critical Rendering Path (CRP) ์กฐ์‚ฌ
๋ธŒ๋ผ์šฐ์ €๊ฐ€ HTML, CSS, Javascript๋ฅผ ํ™”๋ฉด์— ์‹ค์ œ ํ”ฝ์…€๋กœ ๋ณ€ํ™˜ํ•˜๋Š” ๋‹จ๊ณ„์˜ ์ˆœ์„œ
๋ Œ๋”๋ง ์ฐจ๋‹จ ๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•œ ์ดํ•ด

+++

Before

speedline์œผ๋กœ ์ธก์ •ํ•œ ์ด๋ฏธ์ง€

+++

After

speedline์œผ๋กœ ์ธก์ •ํ•œ ์ด๋ฏธ์ง€ (2)

+++


์—ฌ๋Ÿฌ๋ถ„์˜ ์‚ฌ์ดํŠธ๋Š” ์–ด๋– ์‹ ๊ฐ€์š” ?

Lighthouse๋กœ ๊ฐœ์„  ์ „๊ณผ ํ›„๋ฅผ ๋น„๊ตํ•œ ์ด๋ฏธ์ง€ ์ฒจ๋ถ€, ํŠนํžˆ performance ์„ธ๋ถ€ ํƒญ์„ ๊ฐ•์กฐํ•˜์—ฌ ์–ผ๋งŒํผ ๊ฐœ์„ ์ด ๋˜์—ˆ๊ณ , ์—ฌ๊ธฐ์„œ ์–ด๋–ค๊ฑธ ๋” ์ ์šฉํ•˜๋ฉด ๋” ๊ฐœ์„ ์ด ๋˜๋Š”์ง€์— ๋Œ€ํ•œ ์„ค๋ช… ์ฒจ๋ถ€


QnA

์งˆ์˜ ์‘๋‹ต


๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค