KlimaDAO / klimadao

Monorepo for the official KlimaDAO site, dApp, components and design system.
https://klimadao.finance
MIT License
92 stars 74 forks source link

[performance] Individual `/project` pages slow load #2253

Closed psparacino closed 7 months ago

psparacino commented 7 months ago

Describe the bug Individual project loads are lengthy, preceded by a white screen.

This could possibly be caused by the mapbox token:

Screen Shot 2024-02-12 at 10 58 03 AM

To Reproduce Steps to reproduce the behavior:

  1. Go to https://www.carbonmark.com/projects/ICR-112-2019
  2. Wait for page to load
  3. Open consolve
  4. See error

Expected behavior Page loads without a white screen interlude/delay

sidneyarida commented 7 months ago

I tried but i don't replicate the mapbox token error.

What i found is that when the page is not cached, the screen is white while waiting for server-side to render the page.

These are the methods that take more time and may require some optimization

/projects/:id [1] digital_carbon.getProjectCredits: 347.194ms [1] fetchAllPoolPrices: 307.537ms [1] marketplace.getProjectById: 423.469ms [1] fetchCarbonProject: 127.922ms [1] total time: 1.209s

Atmosfearful commented 7 months ago

Found a fix for the white screen, putting PR up in monorepo.