-
Notifications
You must be signed in to change notification settings - Fork 208
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
Memory leak on subscription #241
Comments
What broswer and browser version is this? There can be weird behaviour in certain browsers where the responseText from the xhr requests is the entire response rather than the newly received part. What is the use case here, site sits there consuming streamed data forever? |
Browser Google Chrome 95.0.4638.69. Site consume actual receive streaming data (data from last response). I tried remove all operations with this data to avoid links from another variables for correct garbage collection, but it doesn't fix my problem. The memory used increases even when I use a subscription without handlers. |
So from what I can see doing some quick testing with xhr.responseText on chrome 95.0.4638.69 it seems it continues to grow over time. There is a stackoverflow post about it here https://stackoverflow.com/questions/21951175/comet-xmlhttprequest-responsetext-grows-endlessly.
So if xhr.responseText was huge, then it would be assigned to textSoFar which might explain the memory usage. will keep looking into it. So if you could check your heap snaptshot and just check the path for those strings, I believe you'll see that it's all in the xhr object. |
What version of Oboe are you using? |
2.1.4 |
@Aigeec From what I understand |
I am trying to use Oboe.js to subscription, receive and parse server data. I have problem with growing string inside function handleProgress() in file oboe-browser.js. In an hour and a half, the string grows from 1.4Mb to 150Mb. In a day, application (tab in browser) crashed. I am trying to use oboe.drop(), but it didn't work for me. I attach example of code and snapshots of memory samplings.
Somebody know how fix this problem?
The text was updated successfully, but these errors were encountered: