question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntervalTrigger hardcoded value

See original GitHub issue

OpenUI5 version: Latest Browser/version (+device/version): Chrome latest

Hi,

I see that ui5 uses a central IntervalTrigger to dispatch events. It is created with a default/hardcoded value of 200ms.

https://github.com/SAP/openui5/blob/2c015796043a3fc7e0e322573d4dd6cfd932ff92/src/sap.ui.core/src/sap/ui/core/IntervalTrigger.js#L152

We would like to improve the performance for our users and thus tune this parameter (lowering the value). How can we achieve this? Is this 200 configurable?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
codeworriorcommented, Jun 24, 2019

The IntervalTrigger is mainly used by the ResizeHandler, a service that regularly checks a set of registered DOM elements for size changes. It was introduced long ago because at that time there was no cross-browser resize-event available for arbitrary DOM elements, only for the window. In the recent months, ResizeObserver became available in many modern browsers and is therefore currently being evaluated as an alternative.

So the answer is NO, not all function invocations have to pass that gateway. Only a very small subset of functions is triggered by that interval. The purpose of the ResizeHandler is no secret, but documentation is, ehm, reduced to a minimum.

0reactions
Naramsimcommented, Jun 24, 2019

Hi, I don’t have any samples right now. Is it true that (I didn’t read all the codebase) that InternalTrigger is some sort of gateway where all the function’s invocations have to pass? Or only some of them? I just would like some documentation about why this is in place and what’s its purpose.

About mobile batteries: I don’t really understand why a thread (loop) should always run every 200ms at all. In most of the cases, it will just do nothing after the page loaded.

Read more comments on GitHub >

github_iconTop Results From Across the Web

interval_trigger – Looker Help Center
Default Value. none. Accepts. A string containing an integer followed by a timeframe (seconds, minutes, or hours). Definition.
Read more >
Pyinstaller with APScheduler - TypeError with IntervalTrigger
IntervalTrigger () as arguments, the code should be, this is where the error comes from. scheduler.add_job(Run, interval.
Read more >
interval_trigger | Looker - Google Cloud
Default Value. none. Accepts. A string containing an integer followed by a timeframe (seconds, minutes, or hours) ...
Read more >
tf_agents.train.interval_trigger.IntervalTrigger | TensorFlow Agents
The triggering interval. fn, callable with no arguments that gets triggered. start, An initial value for the trigger. Methods ...
Read more >
sap.ui.core.IntervalTrigger - API Reference - SAPUI5 SDK
Creates an instance of EventBus. new sap.ui.core.IntervalTrigger(iInterval). Param. Type. Default Value. Description. iInterval. Type: int. Default Value:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found