Skip to content

performance issue when creating a large list with ui-collectionview and angular in iOS #88

@liuy97

Description

@liuy97

App shows two templates with different heights. the list have 10000 items.

<GridLayout>
  <CollectionView
    [items]="itemService.items()"
    [itemTemplateSelector]="templateSelector"
  >
    <ng-template cvTemplateKey="header" let-item="item">
      <StackLayout class="bg-sky-100">
        <Label [text]="item.name" class="text-lg text-green-400 p-4"></Label>
      </StackLayout>
    </ng-template>

    <ng-template cvTemplateKey="item" let-item="item">
      <StackLayout
        [nsRouterLink]="['/item', item.id]"
        class="border-b-indigo border-b-2"
      >
        <Label [text]="item.name" class="text-lg text-gray-500 p-4"></Label>
        <Label [text]="item.role" class="text-lg text-gray-400 p-4"></Label>
      </StackLayout>
    </ng-template>
  </CollectionView>
</GridLayout>

It takes about 10s before the list can be scrolled in iOS. But It scrolls smoothly in android.

Screen.Recording.2025-04-01.at.15.13.13.mov

demo.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions