Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] SSR 테스트 PR #99

Closed
wants to merge 1 commit into from
Closed

[DO NOT MERGE] SSR 테스트 PR #99

wants to merge 1 commit into from

Conversation

woohm402
Copy link
Member

@woohm402 woohm402 commented Sep 11, 2022

머지할 PR이 아닙니다!

테스트

방법

Macbook Pro 16 inch (M1 pro) / RAM 16GB

CSR, SSR 각각에서 크롬 devtool performance 탭을 열고 FCP, LCP 를 측정
모든 경우에서, 캐시 비우고 새로 로드

image

csr -> 현재 배포방식대로 yarn exportserve 로 띄우기
ssr -> yarn buildyarn start 로 띄우기

1.9MB짜리 폰트 가져오는데 csr은 135ms ssr은 133ms 걸린 걸 보니 로컬 서버 -> 로컬 브라우저 네트워크 속도는 (servenext 가 내부적으로 쓰는 뭐시기의 차이) 비슷했나 봄

결과

CPU 현재 SSR 변경
0x slowdown
(No Throttle)
FCP : 211.5ms 
LCP : 375.9ms
image
FCP : 181.2ms 
LCP : 333.0ms
image
4x slowdown
FCP : 544ms 
LCP : 796ms
image
FCP : 326.2ms 
LCP : 845.2ms
image
6x slowdown
FCP : 717ms 
LCP : 1004ms
image
FCP : 359.4ms 
LCP : 912.6ms
image

당연히 (아마도 OS의 내부 동작에 의한?) 오차범위가 좀 있긴 했어서 대충 엥? 하는 생각 들면 다시 두세번 더해보고 "어 그치 이래야지" 싶을 때 기록했습니다

귀찮아서 변인통제 제대로 안했음..

처음에 테스트에 lighthouse 쓰려고 했는데, 왜인지 lighthouse가 뭘 갖다줘도 0.6s 라고만 말해서 뭔가 제가 잘못 쓴 건지 lighthouse가 자기만의 캐싱 알고리즘이 있는건지 모르겠어서 포기하고 직접 performance 탭 들어가서 체크했습니다

레퍼런스

  • FCP: 대충 보이는거 첫번째쯤 / LCP: 대충 보이는거 마지막쯤
    • 정확히 뭐인지는 해당 문서 들어가면 나옵니다

@woohm402 woohm402 self-assigned this Sep 11, 2022
@woohm402 woohm402 force-pushed the refactor/ssr branch 2 times, most recently from 0560609 to f08cc61 Compare September 11, 2022 15:43
@woohm402 woohm402 closed this Sep 12, 2022
@woohm402 woohm402 deleted the refactor/ssr branch September 19, 2022 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant