Open woog2roid opened 3 months ago
This is because continuously attempting to reconnect every time the browser is opened can burden computer resources, such as memory.
Could you elaborate on burden computer resources
part a bit and also give me brief about the issue you faced or we could face?
I think the extension needs to do polling the socket room for the reconnection feature.
However, this will continue to send requests in the background, which I think could be a waste of computer resources.
That's why I suggested an option like reconnectInterval
.
Can you provide me some code example to resolve it ( as I am still not sure about you request)? or maybe open PR so that we both can look into it together?
It seems that there is no feature to reconnect in the package's
src/scripts/background-reload.ts
.It would be better to add code that reconnects using a polling method, and to allow this feature to be enabled from vite.config.ts with the default set to false. This is because continuously attempting to reconnect every time the browser is opened can burden computer resources, such as memory.
Then, it will look like this.
The addition of this feature will allow for a very convenient DX as you can turn the function on and off as needed.