socketio / socket.io-client-swift

Other
5.22k stars 843 forks source link

high energy impact on iPhone when idle #959

Closed murad1981 closed 6 years ago

murad1981 commented 6 years ago

when i use the following config:

 let config : [String: Any] = ["log": true,
                                  "compress": true,
                                  "forcePolling": true]
    var socketManager = SocketManager(socketURL: url, config: config)
    var socket: SocketIOClient = socketManager.defaultSocket

I noticed that there was big a energy impact on the iPhone device even if it's idle (without emitting commands) as appears in the below screenshot. does anybody have an idea on what's going on here ?

screen shot 2018-02-27 at 9 15 51 am
nuclearace commented 6 years ago

I haven't done any energy impact on this lib on iPhone in a very long time. But in theory it shouldn't be that energy hungry unless it's emitting or if the server has set a crazy ping rate.

murad1981 commented 6 years ago

it turned about to be something else other than SocketIO, we're using WebRTC along with SocketIO and it's casing this issue when capturing video frames.