Having a trouble with performance using an angular version of swiper. I'm not trying to implement some specific stuff behaviour of swiper, just simple <swiper>...some slides....</swiper> thats what i need.
Given: 15 swiper components per page, each of them may have 20-40 slides.
At some point i have noticed that page just not respond at all, i have noticed that console spams me with messages like that
[Violation] 'pointermove' handler took <N>ms
So it obviously why page freezes. After little investigation i have found that origin of this are method onTouchMove which are called on each move of mouse AND for each swiper instance. Once pointermove event fired by browser - it makes 15 calls of this method.
You can see some sample below, it does not produce such big problems as it very simple example. But you may open task manager of chrome and you will see what impact to CPU when you move mouse. So accounting this simple case you can imagine how it looks at site where swiper are just a little part.
https://stackblitz.com/edit/pointermove-issue
onTouchMove() should be called when it touch and then move, not just move
So it simple, just any move raises execution of onTouchMove()
@vltansky wondering will it be fixed with your PR #4197 (which is not released yet)?
@nolimits4web pretty sure that yes
Can we make a release?
Will do tomorrow
Thank you very much for fast reaction, hope soon release will solve an issue
Just released 6.4.12, can you check if it is fixed there?
Yeah! Site are working much more better now! at least part with swiper does not make a troubles.
Thank you very much!
Most helpful comment
Will do tomorrow