powered by Jive Software

Spark eats cpu time


Spark regularly eats CPU time when it’s doing nothing. Sometimes even 100% of available CPU time. I’m pretty sure that it’s the animated emoticons doing it, since it only happens when animated emoticons are displayed.

Please implement this a bit more efficiently.


Animated icons/etc are notoriously bad about such things. By nature of it having to animate the icons, of course it’s doing something. =) And it has to stay busy the whole time animating these things. I often noticed that on my previous work machine (at my old job) that had a semi-loud drive. If I had a web page open that had an animated something-or-other on it, I’d keep hearing “tick tick tick tick” from the drive. If you’ve got ideas of how to make it more efficient, I’m all ears. I’m not 100% sure at the moment, but I think that’s even handled by java itself, not by Spark’s own code.

I think it’s just not well implemented, it’s using way more cpu than I’d expect it to use, and sometimes it uses all the cpu it can get. It shouldn’t be active all the time, even if it appears to be active continuously. A frame rate of 10 per sec is probably pretty good for those emoticons, so the thread should be sleeping most of the time.

I suspect it’s using a separate thread per emoticon. It would be great if you can use one thread to handle all emoticons, and also turn the thread to sleep when the window is minimized (Currently it stays active even when minimized).

EDIT: it also still eats cpu even if all the emoticons have scrolled off the window.

Muchas gracias,


Anyone else even “noticing” this?

I mean I’m using a standard Swing ImageIcon. There’s a lot a lot of flexibility there in terms of tweaking it that I’m aware of.

See: http://forum.java.sun.com/thread.jspa?threadID=285014&messageID=1114619 and the lack of responses for example

I’m hunting google. Hell, I’ll create an issue on it. Anything you or anyone can think of to help point me in the right direction, please comment:


Here’s some skype emoticons to test with, there is one in particular that will point out the problem real nice: (toivo)

Put the zip file in this folder: C:\Program Files\Spark\xtra\emoticons

Thanks for looking into this!

skype_emoticons_set_2_5590_2599.zip (132498 Bytes)

Reminds me of SPARK-287 and http://www.igniterealtime.org/community/message/119870 with an sample image and stack trace.

Do you see the same stack trace again?


You guys are the developers, you figure it out! It’s pretty easily reproducible with the icon set I attached above.



On my X2 machine it was using 50% CPU with Skype icons. Interesting thing is that when i changed back to unanimated icons and opened that chat again it was still using 50%. So i had to restart Spark.

Users 100% of my CPu when I try to add the gadugadu emoticon set. I have to restart spark before the cpu returns to normal. Also, this particular emoticon set is larger than what is visible when you try to select an emoticon. Is there a way to have spark see them all?