-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Manifund homepage load is still very slow (~5-7s), it looks like projectList is too big for NextJS cache, and so it's doing a db load every time
Error: Failed to set Next.js data cache, items over 2MB can not be cached (3301986 bytes)
Probably we don't want to be sending 2mb of stuff anyways (it's kinda crazy to be sending that much for just 600 projects, that doesn't even include the descriptions)
maybe we pack down the txns? on a quick skim that's consuming the bulk of the data. For the home page we just care about aggregate donated amounts.
or you might have other ideas about how to make this better -- the overall goal is that homepage should feel instant, like the Hacker News homepage; and also the code should be reasonably extendible eg if we end up wanting to show # of donors on each project, hopefully that's not too much of a pain to do
(aside, it looks like our nested thing doesn't work anymore because we're not using projectLimit)
{/* Use nested suspense to load the full feed after the fast feed */}
<Suspense
fallback={
<Suspense fallback={<FeedTabsSkeleton />}>
<AsyncFeedTabs
searchParams={props.searchParams}
userId={user?.id}
projectLimit={30}
/>
</Suspense>
}
>
<AsyncFeedTabs
searchParams={props.searchParams}
userId={user?.id}
projectLimit={2000}
/>
</Suspense>