It seems that paging mechanism (
JENKINS-28918) introduced regression in the situation where the first job in the pipeline has many historical builds.
With paging enabled `Pipeline.createPipelineLatest()` creates a `Pipeline` instance for [every](https://github.com/Diabol/delivery-pipeline-plugin/commit/072343839463fe97a5b09e3ac47ef9f9433b239b#diff-abd99f83e18e7913a8ea3929339bc3a2R228) historical build (even if just a few will be displayed in the pipeline view). Before that change (or with paging disabled) only instances required to display are created.
From the profiler output (see screenshots) the amount of processing time spent in `createPipelineLatest()` increased from ~10% to ~50% for just 20 builds. For projects with 300+ historical builds number of processing treats makes Jenkins irresponsible very quickly.
Looking at the implementation currently not displayed builds are removed at the end in `Component.getPipelines()`. It would be probably required to pass paging information the Pipeline class to create only Pipeline instances that will be used in the view.
Suresh Kumar WDYT?