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

Don't subscribe to Item events to reload model #2949

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Dec 28, 2024

Related to #2584 and openhab/openhab-core#4466.

This avoids that the global SSE connection is always established, and therefore reduces problems with the max parallel HTTP connections limitation. The global SSE connection is now only established if the web audio sink or the command Item are enabled.

Whilst this change potentially makes the UI not reload the model automatically on change, practically the now removed mechanism might haven't been really useful at all because the model is already reloaded on Main UI start, and if SSE was not connected the moment an Item changed the mechanism did not trigger.

This avoids that the global SSE connection is always established,
and therefore reduces problems with the max parallel HTTP connections limitation.
The global SSE connection is now only established if the web audio sink or the command Item are enabled.

Whilst this change potentially makes the UI not reload the model automatically on change,
practically the now removed mechanism might haven't been really useful at all because the model is already reloaded on Main UI start,
and if SSE was not connected the moment an Item changed the mechanism did not trigger.

Signed-off-by: Florian Hotze <[email protected]>
@florian-h05 florian-h05 requested a review from ghys as a code owner December 28, 2024 12:05
@florian-h05 florian-h05 changed the title Model: Don't subscribe to Item events to reload Don't subscribe to Item events to reload model Dec 28, 2024
@florian-h05 florian-h05 added bug Something isn't working main ui Main UI labels Dec 28, 2024
@florian-h05 florian-h05 added this to the 5.0 milestone Dec 28, 2024
Copy link

relativeci bot commented Dec 28, 2024

#2601 Bundle Size — 10.9MiB (~-0.01%).

86b04f1(current) vs df02810 main#2600(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Improvement 1 improvement
                 Current
#2601
     Baseline
#2600
Improvement  Initial JS 1.9MiB(-0.01%) 1.9MiB
No change  Initial CSS 577.39KiB 577.39KiB
Change  Cache Invalidation 17.43% 17.42%
No change  Chunks 226 226
No change  Assets 249 249
No change  Modules 2947 2947
No change  Duplicate Modules 154 154
No change  Duplicate Code 1.8% 1.8%
No change  Packages 96 96
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Improvement 1 improvement
                 Current
#2601
     Baseline
#2600
Improvement  JS 9.11MiB (~-0.01%) 9.11MiB
No change  CSS 866.47KiB 866.47KiB
No change  Fonts 526.1KiB 526.1KiB
No change  Media 295.6KiB 295.6KiB
No change  IMG 140.74KiB 140.74KiB
No change  HTML 1.38KiB 1.38KiB
No change  Other 871B 871B

Bundle analysis reportBranch florian-h05:semantic-model-no-ss...Project dashboard


Generated by RelativeCIDocumentationReport issue

@florian-h05 florian-h05 merged commit 5d7f35a into openhab:main Dec 28, 2024
6 checks passed
@florian-h05 florian-h05 deleted the semantic-model-no-sse branch December 28, 2024 12:34
florian-h05 added a commit that referenced this pull request Dec 28, 2024
Related to #2584 and
openhab/openhab-core#4466.

This avoids that the global SSE connection is always established, and
therefore reduces problems with the max parallel HTTP connections
limitation. The global SSE connection is now only established if the web
audio sink or the command Item are enabled.

Whilst this change potentially makes the UI not reload the model
automatically on change, practically the now removed mechanism might
haven't been really useful at all because the model is already reloaded
on Main UI start, and if SSE was not connected the moment an Item
changed the mechanism did not trigger.

Signed-off-by: Florian Hotze <[email protected]>
(cherry picked from commit 5d7f35a)
@florian-h05 florian-h05 added the patch A PR that has been cherry-picked to a patch release branch label Dec 28, 2024
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 patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant