Author Topic: CPU Usage 100%!! PC User  (Read 18138 times)

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #30 on: December 12, 2018, 01:35:02 AM »
I know what is going on here. Two things:

Static effect is also a video. Try to encapsulete the static.mp4 in AVI container (or any other mp4 that sits inside the theme folder of your choice) as it seems to be the cause of 100% CPU usage.

When you test themes make sure you distinguish two types:
- Ones that redraw on each frame and maintain 60fps
- Ones that redraw only on transitions, they redraw only at the currently played video fps

The first group is what you should focus on as it's the most affected by the threaded optimization flag set to auto.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #31 on: December 12, 2018, 02:04:05 AM »
I didn't bother to do that, Oomek. I mean, encapsulating it is a great idea, but cpu usage increases a tiny bit (perhaps 5%) if you turn on the static effect. I just turned it off, less cpu usage. I don't really know why I should leave it on. It's supposed to be the effect you get when you don't have a certain snap of the rom per si, right?

Better to leave it off. Yea.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #32 on: December 12, 2018, 02:07:43 AM »
It's just a workaround until we figure out what is the cause of ffmpeg decoder consuming too much CPU on certain configurations.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #33 on: December 12, 2018, 02:09:47 AM »
Thanks again, man. Really appreciate your help with the ffmpeg stuff.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #34 on: December 15, 2018, 06:54:00 PM »

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #35 on: December 17, 2018, 02:30:55 AM »
What's this?

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #36 on: December 17, 2018, 02:31:33 AM »
I'll have to check this out.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #37 on: December 17, 2018, 02:49:37 AM »
This is a fix for excessive cpu usage while playing videos.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #38 on: December 18, 2018, 01:40:38 AM »
Oomek, could you care to explain a bit more on this?

Do I have to copy all this to my config? So by using this, we don't need to encapsulate anymore? I wanna check this with the cosmos theme.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #39 on: December 18, 2018, 04:37:48 AM »
What you see in the link is a pull request with my commit that fixes the Attract Mode high CPU usage. You don't need to do anything but just wait for the next AM iteration of course if Andrew approves, merges and recompiles AM with my fix in it.

mgerety

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #40 on: December 18, 2018, 06:34:40 AM »
SWEET.   I might grab the source and compile this myself if this doesn't get in a new build in the next day or so.  This issue had originally turned me off to Attract Mode, the crazy high CPU usage.   I've decided to come back because of the community and some themes designed for 240p.  If the CPU usage is under control, I'm all in.

UnknownFigure

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #41 on: December 18, 2018, 08:09:33 AM »
Understood. We'll have to wait and see.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: CPU Usage 100%!! PC User
« Reply #42 on: January 01, 2019, 04:26:09 AM »

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: CPU Usage 100%!! PC User
« Reply #43 on: January 01, 2019, 04:30:22 AM »
The fix has been merged into master

https://github.com/mickelson/attract/commit/2ccc9597a3eb370e4fe31f249704f9ff8675f7a1

Good to know that even video playback resume issues are fixed, great work!

TurnBasedStrategy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: CPU Usage 100%!! PC User
« Reply #44 on: January 07, 2019, 10:43:58 PM »
Thanks, Oomek. Really appreciate this.

Do we have to wait for another build release?