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
When slides per view is set to 'auto', and my slides have a fixed width, I'm seeing the swiper 'update' function run multiple times on the window 'load' event. In my production app this is creating a long blocking task, sometimes up to multiple seconds, and is causing significant performance issues.
Here's a screenshot from a profile of my app.
Zooming in we see a huge number of swiper 'update' calls.
In the minimal repro repo I've attached here, you can see a similar 'update' and 'load' loop (although for some reason split into separate tasks... that could be a framework related difference?).
It seems like having a carousel with fixed width slides like my example should be one of the most basic uses of a carousel for a responsive site, so it's entirely possible that I'm doing something wrong in my usage of it.
Check that this is really a bug
Reproduction link
https://github.com/mattwills8/swiper-perf-issues-repro/tree/main
Bug description
When slides per view is set to 'auto', and my slides have a fixed width, I'm seeing the swiper 'update' function run multiple times on the window 'load' event. In my production app this is creating a long blocking task, sometimes up to multiple seconds, and is causing significant performance issues.
Here's a screenshot from a profile of my app.
Zooming in we see a huge number of swiper 'update' calls.
In the minimal repro repo I've attached here, you can see a similar 'update' and 'load' loop (although for some reason split into separate tasks... that could be a framework related difference?).
It seems like having a carousel with fixed width slides like my example should be one of the most basic uses of a carousel for a responsive site, so it's entirely possible that I'm doing something wrong in my usage of it.
Any help would be hugely appreciated.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
11.1.1
Platform/Target and Browser Versions
macOS Chrome
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: