Repository navigation
Description
Stencil version:
@ionic/[email protected]
└── @stencil/[email protected]
I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
The rendering of ion-list/ion-items is very slow. It seems that many re-layouts are triggered as part of the list rendering. As a result, the rendering takes almost 1.5 second for a very simple list of 200 items:
<ion-list>
<ion-item *ngFor="let item of items$ | async">
<ion-label>{{ item.title }}</ion-label>
</ion-item>
</ion-list>Note that the first rendering is hidden through the use of a hydrated CSS class (with opacity: 0; style) but the rendering is as long.
Expected behavior:
I would expect that the rendering to be as fast as Ionic v3 or at least in the same order of magnitude.
I know that Ionic 4 is currently in beta. However, I would expect that we test a rendering behavior that is as close as possible to what we will in the final version. So I believe the current behavior is not intended and is a bug.
Steps to reproduce:
- open the StackBlitz mentioned bellow
- click on the "Reload" button in the header bar of demo
- observe the scrollbar shrinking as the new list content is re-layout multiple times
Related code:
A StackBlitz showing the behavior (with Ionic 4.0.0-beta.7 as StackBlitz does not play well with the loader):
https://stackblitz.com/edit/angular-ionic-v4-slow-lists
The exact same code (modulo imports, ...) on Ionic 3:
https://stackblitz.com/edit/angular-ionic-v3-fast-lists
Other information:
A screenshot showing the Chrome performance view for the v4 version:
A screenshot showing the Chrome performance view for the v3 version:


Activity
[-]Very slow Ionic `ion-list/ion-item` rendering[/-][+]Very slow Ionic Ionic list/item rendering[/+][-]Very slow Ionic Ionic list/item rendering[/-][+]Very slow Ionic list/item rendering[/+]ptitjes commentedon Sep 23, 2018
I was wrong when saying:
The rendering of the list is done in one shot at the page load.
mcelotti commentedon Jan 16, 2019
Overall ux seems to improve by overriding window.requestAnimationFrame (like suggested in referenced issue)
ptitjes commentedon Jan 16, 2019
I believe it was somehow fixed in latest versions. Closing.