Skip to content

Demokit: Scrolling in the API Reference is CPU intensive #4337

@moreRGB

Description

@moreRGB

What is the issue and how can we reproduce it?

Dear SAP Team, thank you for the awesome work on openUI5. Some of our colleagues are using older windows laptops, where this issue is really noticable. Other colleagues usually have an android tablet as a second device to display docs. For many pages like MDN it is not an issue, but for the demokit it is one.

  1. Open the sample: https://sdk.openui5.org/api/sap.ui.base.ManagedObject
  2. Open your OS resource monitor like task manager. You can also use the chrome profiler.
  3. Scroll down or up
  4. Even on high performance machines you notice that it is sluggish and slow

Suspected Problem:

Set a event listener breakpoint in chrome for Control - "scroll"
This ends in ObjectPageLayout.prototype._onScroll. Please check this function. It does an absurd amount of processing on each tiny bit of scrolling. It might run hundred times per second, without any deferring/throttling and most of the time it just does nothing.

I have no idea how to fix this, just maybe an recommendation to use IntersectionObservers for the lazy loading parts.

Which OpenUI5 version is your project targeting?

Unrelated / 1.140

Is the issue device- or browser-specific?

Tested with Chrome on Android 15 with Samsung S25 Ultra, Chrome on Chromebook, Chrome on S4 Tablet, Chrome on an Lenovo IdeaPad and also Chrome on Macbook.

Confirmation

  • I have searched the existing issues and reviewed the relevant documentation as well as the API reference.
  • I am not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions