Site performance not smooth

I have a main portal page connected to a dataset that pulls 1 record back from the dB collection. There are a few fields with paragraphs etc. When I click a button i apply a filter to the db collection on the page and the elements refresh. The site feels very slow. Pages take 5 to 10 seconds to load and this portal page is no different. I have a home page that is the same and that is just static data, an intro to the site.

I have spent a great deal of time getting this site ready and it hasn’t come cheap and now so far into it I am realising its slow. I can’t help but wonder what a few hundred users would be like if me, a single user is struggling with performance.

I have shrunk images to be about 50kb in size and had to add collapsed fields to help mask the performance issue. I can’t help but wonder if its a case of my site running on very busy hardware or the service at wix is not up to standard. Given that the slowness is also on the static page I am inclined to think its wix and not my site. I am an IT engineer so this stuff isn’t foreign to me. I am looking at caching the home page but what do I do about the portal page. I have about 17 elements connected to a dataset that gets filtered. I am thinking maybe it would be faster to have more datasets but smaller that each refresh in parallel with some async function of some sort.

Any ideas or tips on getting the site to feel acceptable when browsing and not like its running off a server in central Africa?

Having more datasets would probably not help your problem. A few tips for speedier calling of data:
Use .limit() for your queries.
Use queries to have maximum clear control instead of datasets.
Use backend not just for what is sensitive information, but also for caching info called often. Here’s a very well done example you might draw some inspiration from:
https://www.youtube.com/watch?v=n1d0FClxYMM
Finally, async can help if you use it wisely. It can also slow things down if used abundantly.

1 Like

@waynetheron If you share a link to your site and or code to support your written explanation then you may be able to get better support from the community. We will be able to see the effect and if necessary look at what is happening using chrome dev tools.

There are two rendering cycles that occur during a page load that you may be able to use to help improve performance.

Also the size of your data collection and how many rows you are pulling may have an impact.

1 Like

Thanks David - i do have 2 tables but they seem to be the fastest at loading so not an issue and they also use pagination. The issue i am finding most frustrating is when landing on the home page and then clicking to the portal it takes ages to respond and load.

Thanks Steven

The portal page has 8 data sets that are all very small in size, 5 of them have about 8 rows each and 2 have max 30 (for data tables - these aren’t an issue, they load quickly when filtered) and the last one about 10. I have just tried disabling all data sets so the components are just empty placeholders. when landing on the home page (which is acceptably fast as it is using caching being static data), i click the portal with all the disabled data sets and all scripts commented out, it is essentially 10 small images (taking 50ms each to load) and the placeholders that bind to data sets. In this config the page takes 10 to 14 seconds (with developer tools running and 3-4 seconds without. I am trying to get am image up but have to do it via mobile as i am at work. I can give you access to the portal part of the site but you will need to register your email with the site and i will approve it. not sure if you can pm me so i can send the details

Thanks both of you for your advice, both have been helpful and here is my update

I have removed all but 1 dataset which feeds a repeater because it doesn’t look like it is simple to dynamically add content to a repeater. I have however setup a dud filter on load so that no data is fetched and it is replaced when users select options. I have set it up so that the portal loads and all areas are collapsed like a tab and when expanded i go and fetch the data and display it just for that piece. This has reduced the load time however it is still about 2-3 seconds to display (better than before). There is one query in onready when commented out reduced the page load to about 2 seconds. I need to figure out how i can solve that so any tips are most welcome. Anything else apart from further shrinking of images that i could do to perhaps being it down to a second?

here is the chrome dev tools performance profile file, i noticed the page takes slightly longer to load when running the dev tools

https://transfernow.net/235147k79tid

update

i found a useful guide on populating the repeater via code and removed the last data set. The page now loads in about 2 seconds which is acceptable. Thank you all for your guidance on this it has been a big relief.

1 Like

Good to hear. The $item selector is among the most powerful tools in Corvid.