Skip to content

๐Ÿ“ˆ ์„ฑ๋Šฅ ๊ฐœ์„ 

ํ•ด์‹œ edited this page Oct 24, 2024 · 1 revision

๊ฐœ์„  ๋ฐฉ์•ˆ


์†Œ์Šค ์ฝ”๋“œ ์ตœ์ ํ™”

  • โœ…ย ์ฝ”๋“œ ์Šคํ”Œ๋ฆฌํŒ…ย - ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ฒˆ๋“ค์„ ํŽ˜์ด์ง€๋ณ„๋กœ ๋‚˜๋ˆ ์„œ ํ•„์š”ํ•  ๋•Œ๋งŒ ๋กœ๋“œ๋˜๋„๋ก ํ•˜์—ฌ, ์ดˆ๊ธฐ ๋กœ๋”ฉ ์‹œ๊ฐ„์„ ์ค„์ž…๋‹ˆ๋‹ค.
  • โœ…ย ํŠธ๋ฆฌ ์‰์ดํ‚นย - ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” ์ฝ”๋“œ์™€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ œ๊ฑฐํ•˜์—ฌ ๋ถˆํ•„์š”ํ•œ ํŒŒ์ผ์„ ์ค„์ž…๋‹ˆ๋‹ค.
  • ์ค‘๋ณต๋œ ์ฝ”๋“œ ์ œ๊ฑฐย - ๊ณตํ†ต ๋ชจ๋“ˆ์ด๋‚˜ ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜๋“ค์ด ์ค‘๋ณต๋˜์–ด ์žˆ์ง€ ์•Š๋„๋ก ๋ฆฌํŒฉํ† ๋งํ•˜์—ฌ ์ฝ”๋“œ๋ฅผ ๊ฒฝ๋Ÿ‰ํ™”ํ•ฉ๋‹ˆ๋‹ค.

์ด๋ฏธ์ง€ ์ตœ์ ํ™”

  • ์ด๋ฏธ์ง€ ํฌ๋งท ์ตœ์ ํ™”ย - WebP ๊ฐ™์€ ์ตœ์‹  ์ด๋ฏธ์ง€ ํฌ๋งท์„ ์‚ฌ์šฉํ•˜์—ฌ, ์ด๋ฏธ์ง€ ํŒŒ์ผ ํฌ๊ธฐ๋ฅผ ์ค„์ด๊ณ  ๋กœ๋”ฉ ์‹œ๊ฐ„์„ ๋‹จ์ถ•ํ•ฉ๋‹ˆ๋‹ค.
  • โœ…ย ์ง€์—ฐ ๋กœ๋”ฉ(Lazy Loading)ย - ํŽ˜์ด์ง€์— ๋‚˜ํƒ€๋‚˜์ง€ ์•Š๋Š” ์ด๋ฏธ์ง€๋‚˜ ์ปจํ…์ธ ๋Š” ์ง€์—ฐ ๋กœ๋”ฉ์„ ํ†ตํ•ด ํ•„์š”ํ•  ๋•Œ๋งŒ ๋กœ๋“œ๋˜๋„๋ก ์ตœ์ ํ™”ํ•ฉ๋‹ˆ๋‹ค.

ํฐํŠธ ์ตœ์ ํ™”

  • โœ…ย ํฐํŠธ ํฌ๋งท ์ตœ์ ํ™”ย - WOFF2 ๊ฐ™์€ ์ตœ์‹  ํฌ๋งท์„ ์‚ฌ์šฉํ•˜์—ฌ ํฐํŠธ ํŒŒ์ผ ํฌ๊ธฐ๋ฅผ ์ค„์ด๊ณ , ์••์ถ•๋ฅ ์„ ๋†’์—ฌ ๋กœ๋”ฉ ์‹œ๊ฐ„์„ ์ค„์ž…๋‹ˆ๋‹ค
  • โœ…ย ํ•„์š”ํ•œ ๊ธ€๋ฆฌํ”„๋งŒ ํฌํ•จย - ์„œ๋ธŒ์…‹ ํฐํŠธ๋ฅผ ์‚ฌ์šฉํ•ด ํ•„์š”ํ•œ ๊ธ€๋ฆฌํ”„๋งŒ ํฌํ•จ๋œ ํฐํŠธ ํŒŒ์ผ์„ ์ œ๊ณตํ•˜์—ฌ ํฐํŠธ ํŒŒ์ผ ํฌ๊ธฐ๋ฅผ ์ค„์ž…๋‹ˆ๋‹ค.

Sentry Preconnect / Font Preload

  • โœ…ย Sentry Preconnectย - Sentry ๊ฐ™์€ ์™ธ๋ถ€ ๋ชจ๋‹ˆํ„ฐ๋ง ๋„๊ตฌ์˜ ๋ฆฌ์†Œ์Šค์— ๋Œ€ํ•ด preconnect๋ฅผ ์„ค์ •ํ•˜์—ฌ DNS ์กฐํšŒ ๋ฐ TLS ํ•ธ๋“œ์…ฐ์ดํฌ ์‹œ๊ฐ„์„ ์ค„์ž…๋‹ˆ๋‹ค.
  • โœ…ย Font Preloadย - ์ค‘์š”ํ•œ ํฐํŠธ๋ฅผ ๋ฏธ๋ฆฌ ๋กœ๋“œํ•จ์œผ๋กœ์จ ํŽ˜์ด์ง€๊ฐ€ ๋ Œ๋”๋ง๋˜๊ธฐ ์ „์— ํฐํŠธ๊ฐ€ ์ค€๋น„๋˜์–ด, FOUT ๋ฐ FOIT ํ˜„์ƒ์„ ์ค„์ž…๋‹ˆ๋‹ค.

์• ๋‹ˆ๋ฉ”์ด์…˜ ๋กœ์ง ๊ฐœ์„ 

  • โœ…ย ์• ๋‹ˆ๋ฉ”์ด์…˜ ์„ฑ๋Šฅ ์ตœ์ ํ™”ย - ์• ๋‹ˆ๋ฉ”์ด์…˜์˜ CSS ์†์„ฑ ์ค‘ GPU ๊ฐ€์†์„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์†์„ฑ์„ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๋„๋ก ์ตœ์ ํ™”ํ•˜์—ฌ ํŠธ๋ฆฌ๊ฑฐํ•  ์ˆ˜ ์žˆ๋Š” ๋ฆฌํ”Œ๋กœ์šฐ๋ฅผ ์ตœ์†Œํ™”ํ•ฉ๋‹ˆ๋‹ค.
  • JavaScript ์• ๋‹ˆ๋ฉ”์ด์…˜ ๋กœ์ง ์ตœ์ ํ™”ย - requestAnimationFrame์„ ์‚ฌ์šฉํ•ด ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋ Œ๋”๋งํ•˜๊ณ , ํ”„๋ ˆ์ž„ ๋“œ๋กญ์„ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.

๋งํฌ

https://github.com/woowacourse-teams/2024-coduo/pull/510

https://github.com/woowacourse-teams/2024-coduo/pull/517

์„ฑ๋Šฅ ์ตœ์ ํ™” ๊ฒฐ๊ณผ


์ •๋Ÿ‰ ๊ธฐ๋ฐ˜ ์ง€ํ‘œ (Quantity Based Metrics)

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ฒˆ๋“ค ํฌ๊ธฐ


ย  ๊ฐœ์„  ์ „ ๊ฐœ์„  ํ›„
JS ๋ฒˆ๋“ค ํฌ๊ธฐ 322kB 191kB (main.js + 325.js)

๋ฆฌ์†Œ์Šค ํŒŒ์ผ ํฌ๊ธฐ


image.png

image.png

image.png

ย  ๊ฐœ์„  ์ „ ๊ฐœ์„  ํ›„
ํฐํŠธ ํฌ๊ธฐ 2302kB 134.7kB
๊ฐ€์žฅ ํฐ ์ด๋ฏธ์ง€ ํŒŒ์ผ 180kB 5.5kB

์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์ง€ํ‘œ (Timing Based Metrics)

LCP (Largest Contentful Paint), CLS (Cumulative Layout Shift), INP (Interaction to Next Paint)


๋ฉ”์ธ ํŽ˜์ด์ง€

image.png

ย  ๊ฐœ์„  ์ „ ๊ฐœ์„  ํ›„
LCP 200ms 129ms
CLS 0 0
INP - 40ms

ํŽ˜์–ด๋ฃธ ์˜จ๋ณด๋”ฉ ํŽ˜์ด์ง€

image.png

ย  ๊ฐœ์„  ์ „ ๊ฐœ์„  ํ›„
LCP 200ms 194ms
CLS 0 0
INP - 32ms

ํŽ˜์–ด๋ฃธ ํŽ˜์ด์ง€

image.png

ย  ๊ฐœ์„  ์ „ ๊ฐœ์„  ํ›„
LCP - 171ms
CLS 0 0
INP - 8ms

๋ Œ๋”๋ง ์ง€ํ‘œ (Rendering Metrics)

Frame Drop


  • ํ”„๋ ˆ์ž„ ๋“œ๋กญ ๋ฐœ์ƒ๋ฅ  0%
  • ๋ชจ๋“  ํŽ˜์ด์ง€์—์„œ ํ”„๋ ˆ์ž„ ๋“œ๋กญ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Œ.

๊ทœ์น™ ๊ธฐ๋ฐ˜ ์ง€ํ‘œ (Rule Based Metrics)

Lighthouse Performance ์ ์ˆ˜


๋žœ๋”ฉ ํŽ˜์ด์ง€

image.png

๋ฉ”์ธ ํŽ˜์ด์ง€

image.png

ํŽ˜์–ด๋ฃธ ์˜จ๋ณด๋”ฉ ํŽ˜์ด์ง€

image.png

๐Ÿ€ ์ฝ”๋”ฉํ•ด๋“€์˜ค

์ „์ฒด

์ •๋ณด

BE

FE

๊ธฐ์ˆ 

์ปจ๋ฒค์…˜

ํ…Œ์ŠคํŠธ

์„ฑ๋Šฅ ๊ฐœ์„  & ์ ‘๊ทผ์„ฑ ๊ฐœ์„  ๋ฆฌํฌํŠธ

์ธํ”„๋ผ

Clone this wiki locally