Problem Statement
Profile pages are loading slowly because we fetch user data, repositories, organizations, and contributions sequentially.
Proposed Solution
Refactor the data fetching logic in src/app/[username]/page.tsx and src/lib/profile-data.ts to use Promise.all or Promise.allSettled. This will allow all external GitHub API requests to fire simultaneously, significantly reducing the Time to First Byte (TTFB).
Alternatives Considered
None. Parallelizing independent network requests is a standard optimization.
Additional Context
Be mindful of error handling. If one promise fails (e.g., organizations API returns 500), it shouldn't crash the entire profile page.
Problem Statement
Profile pages are loading slowly because we fetch user data, repositories, organizations, and contributions sequentially.
Proposed Solution
Refactor the data fetching logic in
src/app/[username]/page.tsxandsrc/lib/profile-data.tsto usePromise.allorPromise.allSettled. This will allow all external GitHub API requests to fire simultaneously, significantly reducing the Time to First Byte (TTFB).Alternatives Considered
None. Parallelizing independent network requests is a standard optimization.
Additional Context
Be mindful of error handling. If one promise fails (e.g., organizations API returns 500), it shouldn't crash the entire profile page.