ionic-framework: List are really slow to scroll on iOS / iPad 2
Ionic version: (check one with “x”) [ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.x
I’m submitting a … (check one with “x”) [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: Scrolling a list is really slow (3 to 5 seconds response time of freeze), especially on iOS / iPad 2. So app is unusable on iPad 2, very slow on iOS I can see the latency in safari with remote debugging.
Expected behavior: Scrolling time normal.
Steps to reproduce:
Tested with a ion-list of 70 items (and also reproduced it with an ionic virtual scroll).
Tester should just create a list with around 70 items in it, with at least one text and 2 small icons (20px x 20px).
Related code: Git Repo: https://github.com/Bluestart83/IonicSlowListTest in home.html
Other information: To fix the bug I only commented in main.css of ionic this CSS rule:
:focus,
:active {
outline: none;
}
Commenting this rule fix everything without changing anything to the App UI. On Android this code does not improve anything and change the appearances (for ion-checkbox as example).
You need to remove from the rule from ios project in “Staging/www/build/main.css”
main.css DEV:
:focus,
:active {
outline: none;
}
main.css PROD:
:active,:focus{outline:0}
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.9.1
ionic (Ionic CLI) : 3.9.1
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.4.0
System:
Android SDK Tools : 26.0.2
ios-deploy : 1.9.1
ios-sim : 5.0.12
Node : v6.9.4
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 33 (4 by maintainers)
Commits related to this issue
- fix for issue: List are really slow to scroll on iOS / iPad 2 #12733 — committed to ChezRD/ionic by ChezRD 6 years ago
@jackyy415 We use a script hook to remove those CSS lines. We use
after_preparebecause it will be ran afterrun,buildetc… Here is how we did:In your config.xml
Our clean-ios-css.js code looks like:
I think it should be fixed by this replacement:
My temporary fix: ionic-fixes.js
and in package.json
@kevinmerckx Thanks a lot. We have tried and it works.
Thank you so much @kevinmerckx @luckylooke this resolved my issues, I wish I came across this solution earlier but you both saved me additional hours of racking my brain. Kudos!
@luckylooke I just wanted to add my heart felt thanks for your research and resolution. After a significant development period, my app was unusable under iOS 10. Your fix solved it. Thank-you.
This is a major bug. The consequences of which are significant for any reasonably sized app targeting iOS. The Ionic team really should push this out as a fix to v3 asap. I simply can’t understand why they would leave this issue out there for everyone starting a new project for the last four months!
To leave on a happy note though, @luckylooke, you rock!
thanks @luckylooke @kevinmerckx it turns out when I pasted the script above into a file it had an extra return before the .replace for the minified version so it was not working, but now it is.
Relieved that this makes iOS usable! Hoping that the Ionic team will incorporate it is asap so others dont struggle with this.
+1
I also encountered this issue. It seems to be causing excessive recalculating styles which is causing the slowdown to occur. All of my virtual scroll items were causing major FPS loss when interacted with and removing the aforementioned CSS rule resolved my issue. I am using an iPad Air 2.
I took your code and applied the WKWebView Engine, which helps but does not completely solve the issue. I suggest using that and also implementing Virtual Scroll so you are not rendering so much data at one time.