skifree.js icon indicating copy to clipboard operation
skifree.js copied to clipboard

Slow after traveling for a while.

Open antijingoist opened this issue 11 years ago • 7 comments

Distance traveled before it slows down depends on machine. Took a while on my MBP in Safari, but on the wife's Chomebook, it slowed to a crawl much quicker.

antijingoist avatar Mar 20 '13 00:03 antijingoist

Hmm, there's probably a reference which isn't being deleted, somewhere. I'll take a look when I get some time. Thanks :)

basicallydan avatar Mar 20 '13 00:03 basicallydan

On my machine it runs really fast for the first few seconds, then slows down a bit. At about 2000 m it slows to a crawl

chinhodado avatar Apr 24 '13 02:04 chinhodado

Hey Chin - what Browser are you using SkiFree.js in?

--Dan http://www.danielhough.co.uk/

On 24 April 2013 03:16, Chin [email protected] wrote:

On my machine it runs really fast for the first few seconds, then slows down a bit. At about 2000 m it slows to a crawl

— Reply to this email directly or view it on GitHubhttps://github.com/basicallydan/skifree.js/issues/11#issuecomment-16904581 .

basicallydan avatar Apr 24 '13 09:04 basicallydan

I'm using Chrome on Windows 8. On Firefox the performance is even more terrible, with constant lagging (at least it's smooth on Chrome) On side note, I'm running it on my netbook with a slow CPU so when this is running its Chrome process uses 50% of my CPU

chinhodado avatar Apr 24 '13 13:04 chinhodado

Wow! Okay, I'll re-assess the use and try to figure something out. Thanks, Chin :)

Dan

On Wednesday, 24 April 2013 at 14:39, Chin wrote:

I'm using Chrome on Windows 8. On Firefox the performance is even more terrible, with constant lagging (at least it's smooth on Chrome) On side note, I'm running it on my netbook with a slow CPU so when this is running its Chrome process uses 50% of my CPU

— Reply to this email directly or view it on GitHub (https://github.com/basicallydan/skifree.js/issues/11#issuecomment-16928322).

basicallydan avatar Apr 24 '13 14:04 basicallydan

Reproduced on Chrome 49.0.2623.112 and Windows 10. It happened after I left the game on overnight and my computer went to sleep. When I checked it in the morning I was at ~92000m travelled, and the tab used a consistent 25% CPU and 250MB RAM to make around 1 fps.

TheGuywithTheHat avatar Apr 12 '16 11:04 TheGuywithTheHat

Hey @TheGuywithTheHat! That is some excellent perf testing right there. Thanks for taking one for the team. I'm not sure what the solution is off the top of my head but I suspect that switching to WebGL would probably be better. Canvas does get notoriously slow the more you do stuff with it. The game loop could probably be improved a little, too.

basicallydan avatar Apr 12 '16 12:04 basicallydan