Prisma Optimize Issue
My code is attached, I am fetching classes from my database which has assignments inside of it. Then, the assignments and classes are mapped in a seperate component that is inside the skeleton. Assignments are mapped inside the classes map. I'm not sure how to make this lightning fast but it sometimes takes 5 seconds to load even on production.
https://cdn.discordapp.com/attachments/1331006139244085278/1331012480964628582/Screen_Recording_2025-01-20_at_1.27.48_PM.mov?ex=67901178&is=678ebff8&hm=fbe72a3de16c8c35da39f95caef198955b81682f4be84df338ab8b779612b999&
this video gets t1 (before the prisma call) and t2 (after the prisma call) and prints t2-t1 to see how long the prisma call took.
it usually takes the longest when I go onto the page after not being on it for a while, and takes some time when navigating to it.
https://cdn.discordapp.com/attachments/1331006139244085278/1331012480964628582/Screen_Recording_2025-01-20_at_1.27.48_PM.mov?ex=67901178&is=678ebff8&hm=fbe72a3de16c8c35da39f95caef198955b81682f4be84df338ab8b779612b999&
this video gets t1 (before the prisma call) and t2 (after the prisma call) and prints t2-t1 to see how long the prisma call took.
it usually takes the longest when I go onto the page after not being on it for a while, and takes some time when navigating to it.

