1

I'm currently writing software for a Raspberry Pi 2B to work as digital signage. I'm trying to use HTML as a kiosk atm.

This works all very well, but javascript and transformation performance is horrible. While it's not that big of an issue that it doesn't work, I find it odd that only 20% of the CPU seems to be "at work".

Is that due to the quadcore architecture? Is there a way to boost performance and use the full 100% of the processor? (Using chromium and epiphany, but I'm willing to transfer to other browsers too if it fixes the issue).

The idea would be to make a ticker using marquee like this : http://www.quackit.com/html/codes/html_marquee_code.cfm

1

Depending on what tool you are looking at, 20% usage of a quad core processor would be 80% of one core.

Loading that ticker example into chrome on a quad core 3.4 GHz x86-64 machine uses 10% (i.e., ~40% of one core) so this is something that is very unlikely to get better on the pi using that code, which I agree performs atrociously (but seemingly regardless of platform).

There's actually no javascript in that example, it appears to use some CSS feature. If you did code something like this in javascript (scrolling a <div> across the screen) I doubt very much it would be so resource heavy.

  • Doing it with Javascript/GSAP now, seems a lot better, but still jittery.. It's viewable, but it's not pleasant to watch. Still uses 15-20% CPU tho. – Lonefish Feb 9 '16 at 9:04
  • The ticker example is not perfectly smooth for me here on the big x86-64 machine -- it stutters slightly every 0.5 - 2 seconds. I don't think I've ever tried something like that in js very seriously, but, e.g., jquery effect type stuff (menu animation, etc.) always seems very smooth. I was just looking at this page which has three different animations at least as complex as a scrolling banner and it uses the same 10%. – goldilocks Feb 9 '16 at 12:27
  • Compare stuff to your laptop, etc. It's certainly not going to be the most efficient way to do animation -- but it is probably the easiest (and most portable). That's a trade-off. – goldilocks Feb 9 '16 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.