Search before asking
Operating System
Operating System Version
No response
It happens on the web browser too?
Yes, it happens on the web browser too
Rocket.Chat Desktop App Version
3.8.9
Rocket.Chat Server Version
4.8.2
Describe the bug
Description
In Injected.ts, the function setupReactiveFeatures is executed using:
setInterval(setupReactiveFeatures, 1000);
This causes the function to run every second indefinitely.
Although setupFlags prevents duplicate feature setup, the interval continues to execute even after all features have already been initialized.
Problem
This results in unnecessary CPU usage because the function continues running even when no additional modules need to be initialized.
Expected Behavior
Once all reactive features are successfully initialized, the interval should stop running.
Possible Solution
Stop the interval once all setup flags are true, or replace the polling mechanism with a more event-driven approach.
How to Reproduce
Steps to Reproduce
- Start the Rocket.Chat Desktop application in development mode.
- Open the developer console.
- Add a temporary log inside the
setupReactiveFeatures function in Injected.ts.
- Observe the console output.
Describe your Expected behavior
No response
Anything else
No response
Are you willing to submit a code contribution?
Search before asking
Operating System
Operating System Version
No response
It happens on the web browser too?
Yes, it happens on the web browser too
Rocket.Chat Desktop App Version
3.8.9
Rocket.Chat Server Version
4.8.2
Describe the bug
Description
In
Injected.ts, the functionsetupReactiveFeaturesis executed using:setInterval(setupReactiveFeatures, 1000);
This causes the function to run every second indefinitely.
Although
setupFlagsprevents duplicate feature setup, the interval continues to execute even after all features have already been initialized.Problem
This results in unnecessary CPU usage because the function continues running even when no additional modules need to be initialized.
Expected Behavior
Once all reactive features are successfully initialized, the interval should stop running.
Possible Solution
Stop the interval once all setup flags are true, or replace the polling mechanism with a more event-driven approach.
How to Reproduce
Steps to Reproduce
setupReactiveFeaturesfunction inInjected.ts.Describe your Expected behavior
No response
Anything else
No response
Are you willing to submit a code contribution?