How to load hospital favorites instantly instead of paginating through 5000+ items? Answered
I have built a hospital directory at https://www.nursingusa.com – creating an account allows users to save hospitals to their favorites, which displays in their profiles.
Currently, this is SLOWLY loading the favorites list, 100 at a time. So if you save a hospital that starts with the letter "z", it has to slowly load/hide 5000+ hospitals, before your favorite shows up.
I need help figuring out how to speed this up. It's layered in via Memberstack + Finsweet
Comments
3 comments
Hey Jordan Winn,
I am assuming you are using #106 memberscript for the saving favorites functionality.
Can you try cloning your profile page where you show saved hospitals and try implementing the following code instead of the memberscript that you have currently in the custom code section?
This is a modification of the #106 memberscript, test this out in the cloned page and see if it helps in loading time of the saved items.
Thank you so much for hopping in to help, A J! This isn't loading Favorites any faster. I have two other scripts loading here, I'm wondering if these slow this down?
<!-- Finsweet Attributes --><script async type="module"src="https://cdn.jsdelivr.net/npm/@finsweet/attributes@2/attributes.js"fs-list></script><!-- [Attributes by Finsweet] CMS Load --><script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsload@1/cmsload.js"></script><!-- [Attributes by Finsweet] CMS Filter --><script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsfilter@1/cmsfilter.js"></script>Jordan Winn, welcome.It might take time to load all the items via Webflow and Finsweet (especially if there are large number of items). That being said, it looks like you are using the latest version of Finsweet (i.e v2) via
Just to keep things clean and consistent, you might consider adapting the CMS with relevant updated attributes wherever you are using CMS Load and Filter of v1 and then update / remove the next two scripts as it might seem fit as per Finsweet's docs.
It is said that v2 has improved performance as well, so not sure if it will help in loading the items in a better pace, but could be worth a try.
Alternatively, you could split the CMS based on some groups (that is if CMS items can be clubbed based on their category as such), so that you don't have all 5000+ items load at once but have a visual interface where the items are segmented and loaded separately via CMS to see if that helps.
Hope this gives you some idea.
Please sign in to leave a comment.