Jump to content

Serious HS bug and a possible FIX


dark13

Recommended Posts

I reported the thing some years ago, honestly I dont' know if it is a problem related to my softwares combination or whatever but I have the same problem on multiple machines.

The problem is really simple: HS uses a truckload of CPU when it's hidden and an emulator is running. In this case I'm pushing a bit the things using a 1080p 120frames to loop the background (the file inside the theme loads a swf in dark13 folder as background swf inside a theme does not loop) but this happens also using a 1080p png inside a swf, you'll notice it on weak rigs.

The situation is far from being ideal...

1996563043_hsbigbug.thumb.png.86f7d4d1dd2a53433d3fe1b6f44343b9.png

 

Around 30% of an intel 4460 cpu time wasted in this case. Basically in these conditions you have to dedicate 2 cores/threads of your CPU to HS. Fun enough this happens also if I use code to remove the swf from stage or when I load it as a movieclip and stop it when HS goes off focus. This is simply crazy. HS is using cpu time to move stuff that is not even on stage or it is stopped.

Well, I need more tests but I've found a simple workaround...

1833717690_hsbigbugFIX.thumb.png.5d7e8ddccf3d12aa96166b39694a26eb.png


Now cpu is just at 2% when HS is hidden and an emulator is running. The trick is really simple: you can set stage property from any swf on stage so I just used this code on an empty Artwork1 layer inside the theme. The swf can be used too on SpecialA1 layer

 

    stage.addEventListener( Event.DEACTIVATE, deactivateCb, false, 0, true );
    stage.addEventListener( Event.ACTIVATE, activateCb, false, 0, true );
    
function deactivateCb(e:Event):void{    
    stage.frameRate = 1
    
}
function activateCb(e:Event):void{    
    stage.frameRate = 60
}

HS is using cpu time to move stuff and I can't prevent it to doing this so I just set the framerate of the stage to 1fps (0.1fps seems ok too) when HS goes off focus and set it back to 60fps when HS gain focus. Pushing stuff at 1fps requires very few cpu power.

I know that BBB is not working on the thing but I also know that some people of the staff has the code and can compile a new version. Can a workaround like this be integrated in HS?

Test Theme: https://1drv.ms/u/s!AlvG-_GLw_qahBJa7zOErF3qUveD?e=Y8J8kw


There's no relative path code, so HyperSpin.exe MUST be in C:\HyperSpin_1.5.1 folder and you need to put dark13 folder inside it.
   

  • Like 4
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 4 weeks later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...