CalNourish / pantry-webapp

Pantry web app built with Next.js
https://www.ucbbncfp.com/
MIT License
8 stars 0 forks source link

Check in performance #165

Open justinazhang opened 1 year ago

justinazhang commented 1 year ago

Not super urgent, but for the check in page the first cal id usually takes significantly longer than other ones (~20 seconds) compared to ~2

janiseliang commented 1 year ago

i think this might be related to the way we're handling sign-ins since the first cal id also has to sign in/get login cookies, so i'll try to see if it works faster with the new auth stuff

justinazhang commented 1 year ago

I just tried it again and it still seems slow :/ its weird cuz its only slow if the webpage sits idle for about like 10 minutes

janiseliang commented 1 year ago

might be the getIdToken call? trying to figure out if it’s ok to remove or if it’ll end up with expired tokens again

justinazhang commented 1 year ago

i did some really spotty testing with the auth tokens on checkout/checkin and it seems like the tokens don't expire? but will also check again haha

janiseliang commented 1 year ago

sg, i will also keep testing

janiseliang commented 1 year ago

hm so it does seem like the token will expire if we keep the page open for too long without refreshing, so i will try to figure out if we can do the force refresh token only if necessary

justinazhang commented 1 year ago

ah shoot bummer :/ thanks for testing!