๐Ÿ‹ "RAIL", ํ”„๋ŸฐํŠธ์—”๋“œ ์„ฑ๋Šฅ์— ๋Œ€ํ•œ ์ค‘์š”ํ•œ ์‚ฌ๊ณ  ๋ฐฉ์‹

๐Ÿ˜Ž ์ถ”์ธกํ•˜์ง€ ๋ง๊ณ  ์ธก์ •ํ•˜์„ธ์š”!



โŒ ์ด๊ฒƒ์ด ์ด ์›น์‚ฌ์ดํŠธ๊ฐ€ ๋Š๋ฆฐ ์ด์œ ์ž…๋‹ˆ๋‹ค!! ์•Œ์•„!
โœ… ์Œ... ๊ทธ๋ƒฅ ์ธก์ •ํ•˜๊ณ  ์ปคํ”ผ ๋งˆ์‹œ๋ฉด์„œ

ํ•˜์ง€๋งŒ ์„ฑ๋Šฅ์„ ์ธก์ •ํ•˜๊ณ  ๋‚˜๋ฉด ์ด๋Ÿฐ ์ƒ๊ฐ์„ ํ•˜๊ฒŒ ๋  ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๐Ÿ˜‘ Hey, I measured... but I don't have goal! 1second? 2second? What is criterion??



๐Ÿ˜Ž ์•Œ๊ฒ ์Šต๋‹ˆ๋‹ค ๊ธฐ๋ณธ ์„ฑ๋Šฅ ๊ธฐ์ค€์ธ tadaaamRAIL์„ ์•Œ๋ ค๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค.
๐Ÿ˜‘ ๋ฃจ๋น„ ์˜จ ๋ ˆ์ผ์ฆˆ?
๐Ÿ˜Ž ์•„๋‹ˆ์˜ค, ๊ทธ๊ฒƒ๊ณผ ์ „ํ˜€ ๊ด€๋ จ์ด ์—†์Šต๋‹ˆ๋‹ค. RAIL์€ "Response, Animation, Idle, Load"๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.


์ฝ˜ํ…์ธ 
๊ธฐ์ค€ ์‹œ๊ฐ„


์‘๋‹ต
100ms

์ƒ๊ธฐ
16ms

๊ฒŒ์œผ๋ฅธ
50ms

์ง
1000ms

โญ ์‘๋‹ต



์ผ๋ถ€ ์ž‘์—…์€ ์‚ฌ์šฉ์ž๊ฐ€ ๋ฌด์–ธ๊ฐ€๋ฅผ ์ž…๋ ฅํ•œ ํ›„ 100ms ๋ฏธ๋งŒ์œผ๋กœ ์‘๋‹ตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Click! ----- less than 100ms -----> open modal


โญ ์• ๋‹ˆ๋ฉ”์ด์…˜



์• ๋‹ˆ๋ฉ”์ด์…˜(์˜์ƒ)์€ ์‚ฌ์‹ค ์ˆ˜๋งŽ์€ ์ด๋ฏธ์ง€๋“ค์˜ ์ง‘ํ•ฉ์ฒด์ผ ๋ฟ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ "1์ดˆ"์— ๋ช‡ ๊ฐœ์˜ ์ด๋ฏธ์ง€๊ฐ€ ์žˆ๋Š”์ง€ ์•„๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค.



์ฝ˜ํ…์ธ 
์ดˆ๋‹น ์ด๋ฏธ์ง€ ์ˆ˜


TV
30

์˜ํ™”
24

๊ฒŒ์ž„
60

PC
60


์ด์ œ ์•„์ฃผ ์‰ฌ์šด ์ˆ˜ํ•™์„ ํ•ด๋ด…์‹œ๋‹ค

1s - 60images
โ†“
16ms - 1image


์ด๊ฒƒ์ด ์• ๋‹ˆ๋ฉ”์ด์…˜์ด 16ms ๋ฏธ๋งŒ์œผ๋กœ ๋๋‚˜์•ผ ํ•˜๋Š” ์ด์œ ์ž…๋‹ˆ๋‹ค.

๊ทธ๋Ÿฐ๋ฐ ์ด 1์ดˆ์— ๋ช‡ ๊ฐœ์˜ ์ด๋ฏธ์ง€๊ฐ€ ์žˆ๋Š”์ง€ ๋‹จ์œ„๋ฅผ FPS(Frames per second)๋ผ๊ณ  ํ•ด์„œ PC์—์„œ ์• ๋‹ˆ๋ฉ”์ด์…˜์€ 60fps์ž…๋‹ˆ๋‹ค.

โ–ผ ์˜ˆ๋ฅผ ๋“ค์–ด chartjs-plugin-streaming์˜ ๊ตฌ์„ฑ์—๋Š” "frameRate"๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

โญ ์œ ํœด



์ฝ˜ํ…์ธ ๋ฅผ ๋กœ๋“œํ•œ ํ›„ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์•„๋ฌด ์ž‘์—…๋„ ์ˆ˜ํ–‰ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด์ง€๋งŒ ์—ฌ์ „ํžˆ XHR ๋˜๋Š” ์ง€์—ฐ ๋กœ๋“œ ์ด๋ฏธ์ง€๋ฅผ ํ†ตํ•ด API์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ž‘์—…์€ 50ms ๋ฏธ๋งŒ์ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ˜€ click Url!
โ†“
๐Ÿ˜€ finish rendering and we see something on browser!
๐Ÿ˜ญ wait, Im browser, I need to load images that I didn't on purpose at first
โ†“
โ†“ (50ms)
โ†“
๐Ÿ˜ญ Ok I've done it! I don't use main thread finally!
๐Ÿ˜€ ohh I can handle now on browser now!!


โญ ๋กœ๋“œ



์›น ํŽ˜์ด์ง€ ์ฝ˜ํ…์ธ  ๋กœ๋”ฉ ์‹œ๊ฐ„

I wanna see dev.io! click url!
โ†“
โ†“ (1 second)
โ†“
I see dev.io contents on browser and handle something as well!


์‹ค์ œ๋กœ ์ฒ˜์Œ์— ๋ชจ๋“  ์ฝ˜ํ…์ธ ๋ฅผ ๋กœ๋“œํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.
์ค‘์š”ํ•œ ๊ฒƒ์€ ์‚ฌ์šฉ์ž๊ฐ€ ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋ณด๋Š” ์ฝ˜ํ…์ธ ๋ฅผ ๋กœ๋“œํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.




โ†’ ๋‹ค์Œ๊ธ€ "๊ทธ๋Ÿผ ์–ด๋–ป๊ฒŒ ์ธก์ •ํ• ๊นŒ??"

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ