You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the list of all municipalities, each municipality name is a link, but there is a delay when you click it. You only see something happen after 1-2 seconds (on my machine)
To Reproduce
Click on a municiaplity name (clearing caches might make a difference) and notice that it takes a long time from the click to something actually happening. For me it's 1-2 seconds.
Expected behavior
I expected to directly get some feedback that I had clicked, e.g. seeing the new page start to load.
Additional context
Based on a comment from @Greenheart:
Kanske för att det tog lång tid att ladda kommunsidorna efter att de klickats? Det kommer nog bli snabbare när vi förbättrar hur vi laddar in data osv.
This might be because it takes a long time for the municipality page to load. Reducing that time could certainly improve this. However, IMO the navigation should happen immediately, and not wait for any loading to happen.
The text was updated successfully, but these errors were encountered:
SSR (Server side rendering) for municipality pages, fetching dynamic data (primarily getting the municipality shield from wikidata). All other data is static and won't need to change more often than we make git commits. Thus we could statically pre-render most pages (e.g. fetching data from the wikidata API during build time/deployment), and then make the SSR only responsible for handling redirects.
Another thing is that SSR on Vercel is run by temporary Node.js functions that need, which are removed from memory when there have not been any requests for a while. This is commonly referred to as "cold starts". Since we're using the Next.js pages router, we could try option 6 from this list to try to improve cold start performance: https://vercel.com/guides/how-can-i-improve-serverless-function-lambda-cold-start-performance-on-vercel "Setting bundlePagesExternals to true under the experimental flag". This should likely happen in the next.config.js file.
It probably won't be worth making major changes for the existing site though, but we'll keep this in mind for the new site. This is also one of the reasons to move away from Next.js and React to reduce both the code and data needed to show the webpage. I expect to see good improvements in this area in the coming months :)
In the list of all municipalities, each municipality name is a link, but there is a delay when you click it. You only see something happen after 1-2 seconds (on my machine)
To Reproduce
Click on a municiaplity name (clearing caches might make a difference) and notice that it takes a long time from the click to something actually happening. For me it's 1-2 seconds.
Expected behavior
I expected to directly get some feedback that I had clicked, e.g. seeing the new page start to load.
Additional context
Based on a comment from @Greenheart:
This might be because it takes a long time for the municipality page to load. Reducing that time could certainly improve this. However, IMO the navigation should happen immediately, and not wait for any loading to happen.
The text was updated successfully, but these errors were encountered: