Giter Club home page Giter Club logo

Comments (2)

jondubois avatar jondubois commented on June 27, 2024

@RollinSafary What is the rate of messages on your client socket? If your client is sending and/or receiving a large number of messages per second and doing a lot of processing, then it can use up CPU which I guess could cause heating. I haven't heard about such issue before so I suspect it may be specific to your use case.

Note though that even highly optimized games like agar.io cause my laptop to overheat because they have a very high message rate.

from socketcluster-client.

RollinSafary avatar RollinSafary commented on June 27, 2024

The main situation is following:
I'm using cordova platform ios to build game for ios platform. Used game engine is Phaser 3, for socket connection is used socket-cluster.
Problem is that my app energy usage is in the end of energy usage "Very High" section. It means that with this usage increasing temperature is normal.
So I've done some tests to find out what does the most part of energy usage.
First test was running empty cordova project without any rendering and network connection. Result was near to no energy usage. So conclusion was that it's not cordova wrapper issue.
Second test: I've tried to run my game without socket connection. Opened one scene and made there multiple animations with hard calculations (but I haven't any scene in with such a load) in 60 fps rendering. So the energy usage was on the start of "Medium" section. Conclusion is that it's not rendering or calculations load.
Third test: I've run my game and still on menu scene. Which is static scene (without any animations). Energy usage was light.
Socket test below
The last test was just usage of socket cluster only for subscribing without getting and sending events.
Game scene is static view without any animations or actions.
So my socket client was sending just ping (every 3 secs) to server. But the energy usage was in the middle of "Very High" section. After entering to game play scene (i'm getting and sending 1 message in 6 second) I've energy usage in the end of "Very High" section.

The most strange part for me is, that even for old android devices socket cluster doesn't make so much energy usage. Tested device was nexus 4 and nexus 5.

The main conclusion is that something wrong in workflow of socket cluster for safari. Because on chrome webView it works just fine.
P.S. I've even deployed game on website and have opened it from safari browser and iPhone starts burning after minute.

from socketcluster-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.