I am currently experiencing performance issues with my application using PrimeNG Listbox to load 20,000 values from an API. The large amount of data is causing crashes and delays. I need assistance in optimizing the performance of the application.
<p-listbox [options]="Filters.segmentList" [(ngModel)]="selectedSegements" [multiple]="true" optionLabel="name" [listStyle]="{'max-height':'250px'}">
<ng-template pTemplate="header">
<div>Segments | Description
</div>
</ng-template>
<ng-template let-segment pTemplate="item">
<div class="segment-item">
<div>{{segment.segment_cd}} | {{segment.segment_desc}}
</div>
</div>
</ng-template>
</p-listbox>