Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Issues and loosing state on Mobile #669

Open
PeterKow opened this issue Jul 16, 2024 · 7 comments
Open

Performance Issues and loosing state on Mobile #669

PeterKow opened this issue Jul 16, 2024 · 7 comments
Labels
needs triage This issue has not been triaged by maintainers

Comments

@PeterKow
Copy link

Describe the bug

When sliding images on a mobile phone, there are some bugs:

  • lag for transition and breaking images
  • losing state when sliding back and forth
  • thumbnails don't sync with the main image

Example video

Based on the official website:

https://github.com/user-attachments/assets/33802cf0-ad3e-499b-a467-285bc8811005
https://github.com/user-attachments/assets/66a9add3-a3b0-4a63-97c6-8bccf74ce154

Example lags:
image

Reproduction

Devices

Use on mobile phone. (Mine iPhone 14 Max)
Browsers: Chrome and Safari

Tested urls:

Versions:

"@fancyapps/ui": "^5.0.36"

Additional context

No response

@PeterKow PeterKow added the needs triage This issue has not been triaged by maintainers label Jul 16, 2024
@fancyapps
Copy link
Owner

Hi,

Well, the performance of the software has been tested on various devices, including quite old iPhones, and everything works beautifully. It has also been used and tested by hundreds of developers and you are the first one to complain about such a thing.

So I'm quite confused as to what is so special about your device, have you somehow enabled a "low performance" mode or something?

@PeterKow
Copy link
Author

Hi, I am also not sure where the problem is, as the iPhone 14 Pro Max is not an old phone and should normally handle it. Tested on fully charged with no "low performance"

Also, I've been using previous v4 and I believe it was working ok. So after upgrading to Paid version there is a downgrade in performance. I've read that these might be related to the latest Safari engine updates, but it also happen on Chrome.

This bug was reported by our customers, as I haven't noticed it for 3 months. Now I tested and can confirm on other mobiles as well.

Can you take a look into the problem and test on different mobiles, as these bugs are looking really bad on the website :/

Let me know if you have more question, thanks

@fancyapps
Copy link
Owner

fancyapps commented Jul 17, 2024

My concern is that I can't reproduce the issues on any device I have access to unless I enable "Low Power Mode". Could this be the reason in your case? iOS seems to drop the frame rate to 30 fps when in low power mode. Not sure what to do here, maybe animations should be disabled when this mode is detected (using hacky solution).

@PeterKow
Copy link
Author

Hi thanks, I've tested on another iPhone 14 and it was working ok. Even with "Low Power Mode" it's sluggish but not breaking.

I just realised that my iOS is 18.0 Beta, and that might be related to the new Safari engine update, so this might be the problem that is coming.

Nevertheless, I am worried about our customers who have just slow/ old phones, maybe it's possible to have some generic fallback for less CPU-hungry animations?

@fancyapps
Copy link
Owner

fancyapps commented Jul 17, 2024

The oldest device I have access to is an original iPhone SE from (I think) 2016 and the animations work very well, absolutely no issues. In fact, I had used it for testing while working on animations for the best possible performance.

Will try to test on iOS 18, thanks for the info!

@devjam1n
Copy link

Sliding the carousel in Safari (iPhone 11 - iOS 17.5.1) lags very much in low power mode (LPM). This is unusual for carousels. I see them working smooth on other websites also with it enabled.

@fancyapps
Copy link
Owner

fancyapps commented Jul 24, 2024

Looks like iOS 18 Safari needs to enable CSS hardware acceleration for carousel slides. This seems to fix it:

.f-carousel__slide {
  transform: translateZ(0);
}

This will be included in the code in the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants