Skip to content

Improve the problem of lagging or even OOM caused by reactivation after hanging in the background for a long time#120

Closed
mzzsfy wants to merge 1 commit into
arl:mainfrom
mzzsfy:main
Closed

Improve the problem of lagging or even OOM caused by reactivation after hanging in the background for a long time#120
mzzsfy wants to merge 1 commit into
arl:mainfrom
mzzsfy:main

Conversation

@mzzsfy

@mzzsfy mzzsfy commented Jan 4, 2024

Copy link
Copy Markdown

No description provided.

…er hanging in the background for a long time
@arl

arl commented Jan 4, 2024

Copy link
Copy Markdown
Owner

Hi and thank you for contributing
Can you say a bit more about the issue and explain the solution you implemented to resolve it.

@mzzsfy

mzzsfy commented Jan 4, 2024

Copy link
Copy Markdown
Author

When your page is in the background for a long time (minutes or even hours, Chrome), the callback of websocket.onmessage will not be processed on time. When the page is reactivated, onmessage is called repeatedly, which will generate a large number of UI redraw, which will cause the page to freeze or even OOM
My solution is to separate the ui redrawing from the onmessage method and use the setInterval method to render the ui separately. When onmessage is called repeatedly, a large number of ui redrawing will not occur.

@arl

arl commented Jan 4, 2024

Copy link
Copy Markdown
Owner

I see, thank you very much.

@mzzsfy

mzzsfy commented Jan 4, 2024

Copy link
Copy Markdown
Author

Nice, so when will this be released to the next version? I have encountered this problem many times. In the worst case, I need to use the task manager to forcefully close chrome.

@arl

arl commented Jan 4, 2024

Copy link
Copy Markdown
Owner

Nice, so when will this be released to the next version?

As soon as I've got the time to try your PR, merge it and tag a release. I hope to have time today, or else it's going to be during the weekend

@mzzsfy

mzzsfy commented Jan 4, 2024

Copy link
Copy Markdown
Author

I see, thank you very much.

@arl

arl commented Jan 6, 2024

Copy link
Copy Markdown
Owner

I've tried to reproduce the problem you were having but I couldn't.
Can you detail the steps needed to reproduce it please, by creating a new issue so it 'd be easier to keep track thank you?

@mzzsfy

mzzsfy commented Jan 6, 2024

Copy link
Copy Markdown
Author

Windows systems,open web page, use Microsoft Edge and play the video in full screen. It will take about a few minutes to reproduce the problem(Make sure the energy -saving mode is not closed).If you still can't reproduce this scenario, I will submit an issue

mzzsfy added a commit to mzzsfy/statsviz that referenced this pull request Jan 6, 2024
@mzzsfy

mzzsfy commented Jan 6, 2024

Copy link
Copy Markdown
Author

Already solved #122

@mzzsfy mzzsfy closed this Jan 6, 2024
mzzsfy added a commit to mzzsfy/statsviz that referenced this pull request Jan 6, 2024
delete websocket
done arl#117
done arl#119
done arl#120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants