Hello,
I'd like to share some insights and concerns regarding the use of Swift, specifically focusing on its "components" feature. In my recent testing, I noticed a correlation between the number of different components used and the page speed, especially when dealing with the product list page (PLP) containing a substantial number of items.
I conducted tests on a fresh Swift implementation (1.21.0) where I observed the PLP loading 48 products in under 1 second when displaying only product image and title per card. However, as I added more components like descriptions, "add to cart" functionality, and others, the loading time increased significantly, reaching up to 2 seconds and sometimes beyond. This trend became more pronounced as the number of components approached that of a real-world example for one of our clients where the list takes around 4-6+ seconds to load.
From my findings, it's apparent that Swift's performance can be affected by the number of components being loaded.
Furthermore, we've noticed that a component without a dummy product, might have an impact on the load time, as we noticed a significant drop in load time after filling out the dummy product field with a product resulting in the PLP loading twice as fast. It seems as it would load all products from the index without a dummy product.
For now, one potential solution to improve initial load times could be consolidating various components into a single component, reducing the number of template requests.
I used ?debug=true throughout the testing to see if it was held back by database requests but it does not seem to be the case for our client.
I hope these insights are helpful :-)
I'm curious to know if Dynamicweb has any specific performance recommendations for Swift regarding how many components should be used, the number of products to display on the first load, and the test setups for evaluating Swift's speed on product list pages etc.
Best regards,
Nicolai Jessen