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?
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.
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
@wayne theron 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.
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.