-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reports unresponsive #1331
Comments
Why is it re-rendered? |
probably because of the devices dependency from the state |
I guess it makes sense, but it practice it's shouldn't be a problem because nothing really change on the page. What exactly is causing the unresponsiveness? How many records do you have in the report? |
What's causing the unresponsiveness is the re-rendering. It's not only related to the number of records, it's about number of records / number of devices in the user. One example, 100 devices in the user, a report with 700 records. |
Only device status is updated live. Maybe we can separate device status into its own store. That way it shouldn't be re-rendered. |
You mean something like creating a deviceStatuses array in the store and reference it when we need it? Then the status and lastUpdate fields would be duplicated. |
Something like that. |
Wouldn't it be easier to just remove the socketcontroller from the reports page? |
Easier, but it means you will lose notifications. |
Ok, we can put a parameter in the controller so that when we are in reports it doesn't process devices. When we move away it would reconnect so we get the last positions / devices again. |
I think that's fixing the symptom, not the root cause. |
The reports components are re-rendered each time we receive a message in the websocket.
The report page becomes very unresponsive if we generate a report with hundreds of rows (like route report) and we have enough devices on the user to receive updates frequently.
One possible solution to avoid the page from being unresponsive would be to pause the websocket in the reports page and resume when we go back to the map.
Any ideas?
The text was updated successfully, but these errors were encountered: