Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MainUI] Excessive fetching of inbox rest resource from settings/things #2395

Closed
seime opened this issue Feb 23, 2024 · 3 comments · Fixed by #2942
Closed

[MainUI] Excessive fetching of inbox rest resource from settings/things #2395

seime opened this issue Feb 23, 2024 · 3 comments · Fixed by #2942
Labels
bug Something isn't working main ui Main UI

Comments

@seime
Copy link
Contributor

seime commented Feb 23, 2024

The problem

After opening Settings -> Things page, the UI starts reloading the inbox resource excessively. This leads to a frozen UI and overheated CPU.

After initial load:
CleanShot 2024-02-23 at 08 37 12@2x

With a mouse click (anywhere?) it starts issuing a bunch of calls to the inbox endpoint in an endless loop.

CleanShot 2024-02-23 at 08 39 04@2x

The loading of the inbox seems to happen in batches of 100+.

Expected behavior

A single call to inbox, not hundreds (if browser window left open, thousands and a CPU fan going mad)

Steps to reproduce

  1. Open Settings -> Things
  2. After first load, just click on a random place on the page (that isn't a link to another view)

-> Endless loop starts.

Your environment

runtimeInfo:
  version: 4.1.1
  buildString: Release Build
locale: en-NO
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 17.0.10
  javaVendor: Debian
  osName: Linux
  osVersion: 6.1.21-v8+
  osArchitecture: aarch64
  availableProcessors: 4
  freeMemory: 1490051368
  totalMemory: 2147483648
  uptime: 85271
  startLevel: 70

clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: true
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: macos
    pixelRatio: 2
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: en-GB
    languages:
      - en-GB
      - nb-NO
      - nb
      - en-US
      - en
      - no
      - hr
    onLine: true
    platform: MacIntel
  screen:
    width: 1792
    height: 1120
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
    (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
timestamp: 2024-02-23T07:47:13.318Z

Browser console

No information

Browser network traffic

See above

Additional information

  • Problem seem to have been present at least since OH4.0, possibly before.
  • Fairly large OH installation with 500+ things
  • Happens (at least) in the Things overview and the Inbox page.
@seime seime added bug Something isn't working main ui Main UI labels Feb 23, 2024
@seime
Copy link
Contributor Author

seime commented Dec 12, 2024

Still present in 4.2.3

@digitaldan
Copy link
Contributor

I do not see this on my system using chrome on a mac, so i'm not sure what might be triggering this.

500+ things

That is a lot of things, i have tons of items, but far fewer things (and i have a pretty big system), what makes up the bulk of those? How many items are in your inbox ? Anything else "unique" about your setup?

@seime
Copy link
Contributor Author

seime commented Dec 13, 2024

I dug a bit further last night. My findings so far are:

  • The excessive traffic is triggered by processing events from OH
  • Every inbox event causes a full reload of the inbox, no matter the details of the inbox event (ie IGNORED entry)
  • Some bindings create a lot of inbox events, on my system the chromecast (10 devices on my system) and deconz (50 things) sticks out at first glance
  • Many events seems duplicated, I can see a handful or two of events for the same thing coming in consecutively).
  • My inbox has between 100 and 200 ignored entries

There is nothing special on my system AFAIK, just not that many "dumb" electrical things left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants