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

Improve performace/#188 #167

Merged
merged 21 commits into from
Dec 23, 2024
Merged

Improve performace/#188 #167

merged 21 commits into from
Dec 23, 2024

Conversation

seonghunYang
Copy link
Collaborator

@seonghunYang seonghunYang commented Dec 17, 2024

๐Ÿ“Œ ์ž‘์—… ๋‚ด์šฉ

๊ตฌํ˜„ ๋‚ด์šฉ ๋ฐ ์ž‘์—… ํ–ˆ๋˜ ๋‚ด์—ญ

  • ์ด๋ฏธ์ง€ ์ตœ์ ํ™”
    • sizes ์†์„ฑ๊ณผ srcset ์†์„ฑ์œผ๋กœ ๋ฐ˜์‘ํ˜• ์ด๋ฏธ์ง€๋ฅผ ๊ตฌํ˜„ํ•˜์—ฌ ์‚ฌ์šฉ์ž์˜ ๋ทฐํฌํŠธ ํฌ๊ธฐ์— ๋งž๊ฒŒ ์ตœ์ ํ™”
    • ํŒŒ๋น„์ฝ˜ ์ด๋ฏธ์ง€ ํฌ๊ธฐ ์ตœ์ ํ™”
  • ํฐํŠธ ์ตœ์ ํ™”
    • Pretendard๋ฅผ ๊ฐ€๋ณ€ ๋‹ค์ด๋‚˜๋ฏน ์„œ๋ธŒ์…‹์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ์ดˆ๊ธฐ ๋ Œ๋”๋ง ๋ฆฌ์†Œ์Šค 2MB ๊ฐ์†Œ
    • Vitro ํฐํŠธ๋ฅผ '์กธ์—…์„ ๋ถ€ํƒํ•ด' ๊ธ€์ž๋งŒ ์„œ๋ธŒ์…‹์œผ๋กœ ์ œ์ž‘ํ•˜์—ฌ ํฐํŠธ ํฌ๊ธฐ๋ฅผ 365KB์—์„œ 3KB๋กœ ์ ˆ๊ฐ
  • ๋ฒˆ๋“ค ํฌ๊ธฐ ์ตœ์ ํ™”
    • Axios ๋ชจ๋“ˆ์„ fetch-ax๋กœ ์ „ํ™˜ํ•˜์—ฌ ๋ฒˆ๋“ค ํฌ๊ธฐ ๊ฐ์†Œ (Result ํŽ˜์ด์ง€: 164KB โ†’ 147KB, My ํŽ˜์ด์ง€: 181KB โ†’ 165KB)
    • Result ํŽ˜์ด์ง€์˜ ResultCategoryDetail(๋ชจ๋‹ฌ) ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ง€์—ฐ ๋กœ๋”ฉํ•˜์—ฌ ๋ฒˆ๋“ค ํฌ๊ธฐ 21KB ๊ฐ์†Œ (147KB โ†’ 126KB)
  • ๋ฉ”์ธ ํŽ˜์ด์ง€ ๋ฐ ๊ฒฐ๊ณผ ํŽ˜์ด์ง€ lighthouse ์ ‘๊ทผ์„ฑ + ๊ถŒ์žฅ์‚ฌํ•ญ ๊ฐœ์„ 
    • ๋„ค๋น„๊ฒŒ์ด์…˜ ์•„์ดํ…œ ๋ฒ„ํŠผ์˜ ํ„ฐ์น˜ ์˜์—ญ ํ™•๋Œ€
    • ์‚ฌ์ด๋“œ๋ฐ” ํ† ๊ธ€ ๋ฒ„ํŠผ์— ๋ ˆ์ด๋ธ” ์ถ”๊ฐ€
    • ResultCategory ์ปดํฌ๋„ŒํŠธ๋ฅผ dynamic ํ•จ์ˆ˜๋กœ ํด๋ผ์ด์–ธํŠธ ์ง€์—ฐ ๋กœ๋”ฉ ๊ตฌํ˜„ (Result ํŽ˜์ด์ง€ Minified React error #419 ํ•ด๊ฒฐ)
    • UserInfoContent ์ปดํฌ๋„ŒํŠธ๋ฅผ ์„œ๋ฒ„ ์ปดํฌ๋„ŒํŠธ๋กœ ๋ณ€๊ฒฝ (Result ํŽ˜์ด์ง€ Minified React error #419 ํ•ด๊ฒฐ)
    • Responsive ์ปดํฌ๋„ŒํŠธ์˜ ์„œ๋ฒ„ ๋ Œ๋”๋ง ๋ฐฉ์ง€ (Result ํŽ˜์ด์ง€ Minified React error #418 ํ•ด๊ฒฐ)

๊ฐœ์„  ๊ฒฐ๊ณผ

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

  • ์ดˆ๊ธฐ ๋ Œ๋”๋ง ๋ฆฌ์†Œ์Šค: 4.6MB โ†’ 2.2MB
  • Lighthouse ์„ฑ๋Šฅ: 81 โ†’ 95
    • LCP: 3.1์ดˆ โ†’ 1.4์ดˆ
    • SI: 1.6์ดˆ โ†’ 1.0์ดˆ
  • Lighthouse ์ ‘๊ทผ์„ฑ: 94 โ†’ 100
  • Lighthouse ๊ถŒ์žฅ์‚ฌํ•ญ: 93 โ†’ 100

๊ฒฐ๊ณผ ํŽ˜์ด์ง€

  • ๋ฒˆ๋“ค ํฌ๊ธฐ: 178KB โ†’ 126KB
  • Lighthouse ์„ฑ๋Šฅ: 99 โ†’ 100
    • SI: 1.4์ดˆ โ†’ 1.0์ดˆ
  • Lighthouse ์ ‘๊ทผ์„ฑ: 92 โ†’ 100
  • Lighthouse ๊ถŒ์žฅ์‚ฌํ•ญ: 93 โ†’ 100

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

๊ฐœ์„ ์ „ ๊ฐœ์„ ํ›„
แ„Œแ…ฅแ†ซ-1 แ„’แ…ฎ1
แ„Œแ…ฅแ†ซ2 แ„’แ…ฎ2
แ„Œแ…ฅแ†ซ3 แ„’แ…ฎ-3

๊ฒฐ๊ณผ ํŽ˜์ด์ง€

แ„€แ…งแ†ฏแ„€แ…ช

๐Ÿค” ๊ณ ๋ฏผ ํ–ˆ๋˜ ๋ถ€๋ถ„

  • Result ํŽ˜์ด์ง€์—์„œ Minified React error #419 ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” Suspense ๋ฐ”์šด๋”๋ฆฌ ๋‚ด์˜ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์„œ๋ฒ„ ์ธก์—์„œ ์™„์ „ํžˆ ์ฒ˜๋ฆฌ๋˜์ง€ ๋ชปํ•ด ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. (๊ถŒ์žฅ์‚ฌํ•ญ ์ ์ˆ˜ ํ–ฅ์ƒ์„ ์œ„ํ•ด์„œ๋Š” ์ฝ˜์†”์˜ ๋ชจ๋“  ์—๋Ÿฌ๋ฅผ ์ œ๊ฑฐํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค)
    • ์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ResultCategory ์ปดํฌ๋„ŒํŠธ๋ฅผ Next.js dynamic ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•˜๊ณ , ssr ์†์„ฑ์„ false๋กœ ์„ค์ •ํ•˜์—ฌ ์„œ๋ฒ„ ์‚ฌ์ด๋“œ ๋ Œ๋”๋ง์„ ๋น„ํ™œ์„ฑํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค
    • ๋˜ํ•œ UserInfoCard์˜ ์ž์‹ ์ปดํฌ๋„ŒํŠธ์ธ UserInfoContent์—์„œ๋„ ๊ฐ™์€ Suspense ๋ฐ”์šด๋”๋ฆฌ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” UserInfoContent๋ฅผ ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ์—์„œ ์„œ๋ฒ„ ์ปดํฌ๋„ŒํŠธ๋กœ ์ „ํ™˜ํ•˜์—ฌ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค
  • ์—ฌ๋Ÿฌ ํŽ˜์ด์ง€์—์„œ Minified React error #418 ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋Š”๋ฐ, ์ด๋Š” Responsive ์ปดํฌ๋„ŒํŠธ๋กœ ์ธํ•ด ์„œ๋ฒ„์™€ ํด๋ผ์ด์–ธํŠธ์˜ ๋ Œ๋”๋ง ๊ฒฐ๊ณผ๊ฐ€ ๋ถˆ์ผ์น˜ํ•˜์—ฌ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ์˜€์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ์˜ ์„œ๋ฒ„ ์‚ฌ์ด๋“œ ๋ Œ๋”๋ง์„ ๋น„ํ™œ์„ฑํ™”ํ•˜์—ฌ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค. (์ฐธ๊ณ )

๐Ÿ”Š ๋„์›€์ด ํ•„์š”ํ•œ ๋ถ€๋ถ„

  • ๋ฉ”์ธ ํŽ˜์ด์ง€์— SEO๋Š” ๋‹ค์Œ PR์—์„œ ์ˆ˜์ •ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค

gahyuun
gahyuun previously approved these changes Dec 22, 2024
Copy link
Member

@gahyuun gahyuun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค
Suspense ๋ฐ”์šด๋”๋ฆฌ ๋‚ด์˜ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์„œ๋ฒ„ ์ธก์—์„œ ์™„์ „ํžˆ ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š๋Š” ์ด์œ ๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‚˜์šฉ?? ResultCategory๋Š” Responsive ์ปดํฌ๋„ŒํŠธ๋กœ ๊ฐ์‹ธ์ ธ์žˆ์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™์•„์„œ์š”!

@@ -10,7 +10,9 @@ function SubPageLayout({ children }: LayoutProps) {
return (
<>
<NavigationBar />
<Image src={background} width={800} height={288} className="w-full bg-white h-[18rem]" alt="background" />
<div className="relative bg-primary h-[18rem]">
<Image src={background} sizes="100vw" className="absolute bottom-0 bg-white" alt="background" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋Š” sizes๋ฅผ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์–ด๋–ค ํฌ๊ธฐ ์ด๋ฏธ์ง€๋ฅผ ๋ Œ๋”๋งํ•  ์ง€ ์•Œ๋ ค์ฃผ๋Š” ์†์„ฑ์œผ๋กœ ์•Œ๊ณ  ์žˆ๋Š”๋ฐ background ์ด๋ฏธ์ง€๋Š” ๋‹จ์ผ ์ด๋ฏธ์ง€์ด๋ฏ€๋กœ sizes ์†์„ฑ์ด ํ•„์š” ์—†์ง€ ์•Š๋‚˜์š” ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ๊ธฐ๋ณธ img ํƒœ๊ทธ์˜ sizes ์†์„ฑ์€ ๋ง์”€ํ•˜์‹  ์ •์˜๊ฐ€ ๋งž์Šต๋‹ˆ๋‹ค. Next.js์˜ Image ํƒœ๊ทธ์—์„œ sizes ์†์„ฑ์„ ์ •์˜ํ•˜๋ฉด, srcset ์†์„ฑ์ด ์ž๋™์œผ๋กœ ์ตœ์ ํ™”๋˜์–ด ๋ฐ˜์‘ํ˜• ์ด๋ฏธ์ง€๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์˜ˆ๋ฅผ ๋“ค์–ด, sizes ์†์„ฑ์ด 100vw๋กœ ๋™์ผํ•˜๋”๋ผ๋„ ๋ทฐํฌํŠธ๊ฐ€ 1000px์ด๋ฉด 1000w ์ด๋ฏธ์ง€๋ฅผ, 2000px์ด๋ฉด 2000w ์ด๋ฏธ์ง€๋ฅผ ๋ฐ›์•„ ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!
    (์ฐธ๊ณ )
image

@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
import withBundleAnalyzer from '@next/bundle-analyzer';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฒˆ๋“ค ๋ถ„์„ํ•ด์ฃผ๋Š” ๋„๊ตฌ์ธ๊ฐ€์šฉ? ์ด๋ฅผ ํ†ตํ•ด์„œ ๊ฐœ์„ ํ•ด์•ผ ํ•  ์ ์„ ์•Œ ์ˆ˜ ์žˆ๋Š”๊ฑด๊ฐ€์š” !?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ๋„ค, ๋งž์Šต๋‹ˆ๋‹ค. ๋ฒˆ๋“ค ๋ถ„์„์„ ํ†ตํ•ด axios ๋ชจ๋“ˆ์˜ ๋ฒˆ๋“ค ํฌ๊ธฐ๋ฅผ ๊ฐœ์„ ํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
  • package.json์— ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด๋†”์„œ npm run analyze๋กœ ๋ถ„์„์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.
  • ์‹คํ–‰ ์‹œ ์•„๋ž˜์™€ ๊ฐ™์€ HTML ๊ฒฐ๊ณผ๋ฌผ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
image

Copy link
Member

@yougyung yougyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๊ณ  ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค !

@@ -45,7 +45,7 @@ export const useFetchCredits = () => {

const fetchCredits = async () => {
try {
const { data } = await axios<CreditResponse[]>(`${API_PATH.graduations}/credits`, {
const { data } = await fetchAX.get<CreditResponse[]>(`${API_PATH.graduations}/credits`, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchAX.create๋ฅผ ํ†ตํ•ด ์ƒ์„ฑํ•œ instance๋ฅผ ์‚ฌ์šฉํ•˜์ง€์•Š๊ณ  fetchAX๋ฅผ ํ†ตํ•ด ์š”์ฒญ์„ ํ˜ธ์ถœํ•œ ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ์ฒ˜์Œ์—๋Š” ์ƒ์„ฑํ•œ instance๋ฅผ ์‚ฌ์šฉํ•˜๋ ค ํ–ˆ์œผ๋‚˜, ํด๋ผ์ด์–ธํŠธ์—์„œ next/headers ์ ‘๊ทผ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ•ด๋‹น instance๋Š” ์„œ๋ฒ„ ์ชฝ ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ์šฉ์œผ๋กœ ๋‘๊ณ , ๋Œ€์‹  fetchAX๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.

Comment on lines 10 to 16
export default function ResultCategoryDetailContainer({ category }: { category: ResultCategoryKey }) {
const { isOpen } = useDialog(DIALOG_KEY.RESULT_CATEGORY);

if (!category) return;

return <>{isOpen && <ResultCategoryDetail category={category} />}</>;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ธฐ์กด์— ์ปดํฌ๋„ŒํŠธ์˜ ๋ Œ๋”๋ง์—์„œ isOpen์„ ๊ธฐ์ค€์œผ๋กœ ์žก์ง€์•Š์€ ์ด์œ ๋Š”, http://localhost:3000/result?category=PRIMARY_MANDATORY_MAJOR ์œผ๋กœ ๋ฐ”๋กœ ์ ‘๊ทผํ•˜๋Š” ๊ฒฝ์šฐ๋ฅผ ๊ณ ๋ คํ–ˆ๊ธฐ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค!

  1. useDialog์˜ isOpen์กฐ๊ฑด์„ ์ œ๊ฑฐํ•˜์—ฌ ์œ„ ๊ฒฝ์šฐ๋ฅผ ๋ณด์žฅํ•˜๊ณ 
  2. ResultCategoryDetail์˜ if (!category) return;์„ ์ œ๊ฑฐํ•˜์—ฌ ๊ฐ™์€ ์กฐ๊ฑด์„ ํ•œ๋ฒˆ๋งŒ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜๋Š” ๊ฒƒ์€ ์–ด๋–จ๊นŒ์š”?
Suggested change
export default function ResultCategoryDetailContainer({ category }: { category: ResultCategoryKey }) {
const { isOpen } = useDialog(DIALOG_KEY.RESULT_CATEGORY);
if (!category) return;
return <>{isOpen && <ResultCategoryDetail category={category} />}</>;
}
export default function ResultCategoryDetailContainer({ category }: { category: ResultCategoryKey }) {
if (!category) return;
return <>{<ResultCategoryDetail category={category} />}</>;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ์ฒ˜์Œ์— ์ €๋„ category๋กœ ํ•„ํ„ฐ๋ง์„ ์‹œ๋„ํ–ˆ์œผ๋‚˜, category ๋ฐ์ดํ„ฐ๊ฐ€ ์„œ๋ฒ„ ์ธก์— ์กด์žฌํ•˜๋Š” ๋ฐ์ดํ„ฐ์ด๊ธฐ ๋•Œ๋ฌธ์— ํด๋ผ์ด์–ธํŠธ์—์„œ ์ง€์—ฐ ๋กœ๋”ฉ์ด ๋™์ž‘ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์„ ์‹œ๋„ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๊ทธ๋Ÿฐ๋ฐ ๋ง์”€ํ•˜์‹  ๊ฒƒ์ฒ˜๋Ÿผ URL ์ž…๋ ฅ ์‹œ ์ธ์‹ํ•˜์ง€ ๋ชปํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์–ด์„œ, useEffect ์œ„์น˜๋ฅผ ์กฐ์ •ํ•˜์—ฌ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!

47bcef5

@seonghunYang
Copy link
Collaborator Author

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค Suspense ๋ฐ”์šด๋”๋ฆฌ ๋‚ด์˜ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์„œ๋ฒ„ ์ธก์—์„œ ์™„์ „ํžˆ ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š๋Š” ์ด์œ ๊ฐ€ ๋”ฐ๋กœ ์žˆ๋‚˜์šฉ?? ResultCategory๋Š” Responsive ์ปดํฌ๋„ŒํŠธ๋กœ ๊ฐ์‹ธ์ ธ์žˆ์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™์•„์„œ์š”!

  • ๊ธฐ์กด result ํŽ˜์ด์ง€์—์„œ UserInfoCard์™€ ResultCategoryDetail์ด Suspense ๋ฐ”์šด๋”๋ฆฌ๋กœ ๊ฐ์‹ธ์ ธ ์žˆ์—ˆ๋Š”๋ฐ, ๋‘˜ ๋‹ค ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์—ฌ ์ˆ˜์ •์„ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ถ€๋ถ„์€ Responsive์™€๋Š” ๋ณ„๊ฐœ๋กœ ๋ฐœ์ƒํ•œ ์—๋Ÿฌ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค
  • ๋จผ์ € UserInfoCard๋Š” ์„œ๋ฒ„ ์ปดํฌ๋„ŒํŠธ์˜€์ง€๋งŒ, ๋‚ด๋ถ€์— ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์žˆ์–ด์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ๋ฅผ ์„œ๋ฒ„ ์ปดํฌ๋„ŒํŠธ๋กœ ์ถฉ๋ถ„ํžˆ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํŒ๋‹จํ•˜์—ฌ ๋ณ€๊ฒฝ ์ž‘์—…์„ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋‹ค์Œ์œผ๋กœ ResultCategoryDetail์€ ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ์ธ๋ฐ, ํด๋ผ์ด์–ธํŠธ ์ปดํฌ๋„ŒํŠธ๋ฅผ lazy loading ํ•  ๋•Œ๋Š” Suspense์™€ ํ•จ๊ป˜ React.lazy()๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค. Next.js์˜ dynamic ํ•จ์ˆ˜๊ฐ€ ๋™์ผํ•œ ์—ญํ• ์„ ํ•˜๋ฏ€๋กœ ์ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.

Copy link

Copy link

@seonghunYang seonghunYang merged commit e068d25 into main Dec 23, 2024
2 of 3 checks passed
@seonghunYang seonghunYang deleted the improve-performace/#188 branch December 23, 2024 07:11
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.

3 participants