sambecker / exif-photo-blog

Photo blog, reporting 🤓 EXIF camera details (aperture, shutter speed, ISO) for each image.
https://photos.sambecker.com
644 stars 92 forks source link

Initial loading speed is very slow #100

Closed javier3434 closed 1 month ago

javier3434 commented 1 month ago

Hi, sambencker ,thanks for your great work! But I dtk why this nextjs project's initial loading has specific slow speed.(every route, even pages without images) I run the codes locally and my database is cloudflare blob+ vercel postgres. I tried to analyze and improve it but i failed. I do not know if you have the same phenomenon, I have here the white screen obviously perceptible wait, (around 2-3 seconds even longer) and thanks for any suggestions.

Snipaste_2024-05-31_11-54-53

Snipaste_2024-05-31_11-55-28

sambecker commented 1 month ago

Yeah, that doesn't sound right. At a minimum, core pages / and /grid should be statically rendered ahead of time.

I'm always tweaking performance, and have implemented the following:

A few questions:

sambecker commented 1 month ago

I run the codes locally

Just realized you mentioned that this is happening locally.

Only thing I can think of to speed up local development is to try turbopack by running:

vercel env pull
pnpm dev --turbo

If you sync your fork now, you won't need the --turbo which I've just added to the template.

Closing this for now.

javier3434 commented 1 month ago

i will try it ,thanks a lot!