Game performance makes it nearly unplayable. How can I better my performance & prevent freezes?


#1

For me, the game has become pretty consistently unplayable due to slowed performance and freezing.

I’ve been playing for a few months, but gradually the performance has become so bad that I usually can’t get through a full board.

I start playing a level and by the time I get some code running, the browser process will crash (in chrome) or the browser itself will freeze (in firefox).

After google chrome stopped being very usable, I was using Firefox as a secondary browser solely dedicated to codecombat, but after week or two of doing that, the performance now degrades on firefox so quickly that I generally can’t get through a single board before it freezes the browser, freezes or slows down my whole OS (effectively), and generally I have to reboot to get any kind of performance back.

I’m running a Ubuntu 14.04 desktop:

Linux version 3.13.0-62-generic (buildd@lgw01-59) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015
Ubuntu 14.04.3 LTS \n \l
Linux localhostmachine 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Chrome

Google chrome Version 44.0.2403.157 (64-bit)

Firefox

Mozilla Firefox 40.0 for Ubuntu

6 gigs of RAM:

free -h
             total       used       free     shared    buffers     cached
Mem:          5.7G       5.4G       376M       902M        19M       1.3G
-/+ buffers/cache:       4.1G       1.6G
Swap:         9.7G       1.2G       8.5G

Obviously, it’s very hard to give a proper bug report on a problem of this nature, by the time the freeze happens, checking the game console becomes impossible. However, I have made a pastebin of the console of a successful play through a level that crashed, and I then restarted, here:
http://pastebin.com/e6y5Sabg
I have a vague, unfounded suspicion that the freezes/crashes are related to when I high number of entities get on the board (the soldiers and ordering them, maybe even the flowers generated by the flower ring, sometimes), but that’s only based on the “after-the-levels-go-for-a-bit” timing of the freezes.
Here is my worn equipment:

There isn’t any app that freezes my browser so consistently, and I can’t think of any one that manages to also kill overall performance.

If I didn’t love the game, I wouldn’t really care, but as it is, I’m hoping readers might have suggestions for alleviating performance issues and increasing playability.


#2

Hmm…this is unfortunate.

If you are using the flower ring, just unequip them or toggle them off; I get massive perf issues when using them in combat.

Otherwise, assuming this is the default Ubuntu setup and you are using Unity, you could try installing a different, more lightweight desktop environment (Xfce, LXDE; not too hard with apt-get); maybe it might help with performance. (Though it would be best if this wasn’t necessary…and changing DEs also changes a bunch of other settings too.)

I’ve gotten CodeCombat to run inside a VM with 4GB of RAM (with occasional perf issues), so it should be possible.


#3

An option to toggle off some effects might be something to consider implementing. Like being able to turn off the flower effect.


#4

You can turn off the flower effect. Use self.toggleFlowers(False).


#5

Sorry, that’s true, the Ring of Flowers needs a lot of work to become performant–we need to swap out the way it draws the flowers with something new. I’ve started an issue to track this here: https://github.com/codecombat/codecombat/issues/2983


#6

I did, of course, know that the Ring of Flowers was toggle-able off, I’ve had to do that with boards, of course. But even with the first line of code being toggling the ring of flowers off, I’ve had the problems above. With ring of flowers on, stuff gets ugly (e.g. I can’t complete the flower levels due to performance killing that possibility)

However! Considering the performance issues, I’ll try totally unequipping it and seeing if my lot improves, and then revisit the issue.