Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Performance monitor
 Post Posted: Sat Mar 04, 2017 12:40 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
New thing in BAM. For now in beta version:
http://www.ravarcade.pl/beta/BAM.dll

Now when you press F9 you will see somthing like that:
http://www.ravarcade.pl/beta/perf-monitor.png

BAM now for every frame calcs time used to render frame, calc physics, run script.
On chart i also mark:
- green renctangle 11.1ms (90 Hz for VR)
- yellow rectangle 16.6ms (60 Hz)
So you will see if when physics consume too much time.

For every frame we have 3 values:
- frame time (in ms)
- physics time
- script time
BAM will capture 5 worst frames in each category: slowest frame time, physics, script.
It is displayed in 3 columns.
That worst frames are counter are reset after every press F9.

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sat Mar 04, 2017 4:19 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1704
Location: Arkansas, USA
Rafal,

Your new tool appears to work although I am not sure of what the numbers mean. I have saved screenshots of Warlord where I have been having problems with low frame rate on Windows 10. I have also save a screenshot of Astrohits during multiball where I have had some trouble in the past with low frame rate but not today. I have also saved a screenshot of Creature from the Black Lagoon during multiball and have not been having any problems at all although I have to set "Hardware light to use" to 0. I included a copy of the Astrohits and Warlord tables.

Warlord
Image

Astrohits
Image

Creature from the Black Lagoon
Image

The problem Whitey and I have been is documented on this forum topic:

viewtopic.php?f=2&t=6375&start=10

Thanks,

George


Last edited by GeorgeH on Sat Dec 16, 2017 5:45 pm, edited 2 times in total.

Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sat Mar 04, 2017 6:10 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
On all charts you have "bluish" line. That line is amoung of time spend on script execution.
Note, that every third column on tabs is also "script" time.

Now look at Astrohits.
On chart "bluish" line is almost all time around 11 ms and from time to time it jumps to 26-28 ms. Also Pink line (Frame time) is alway ~5ms above that bluish line.
I'm 100% sure, that problem is in script.
I looke at script. There is a lot of "eval" & "execute" commands. It is first place where i will look what to change to improve performance.
Look also at "green" line (physics). It is almost all time well under 3ms. So physics here is not a problem,
Well... that script is source of problem.

Now look at Creature from black lagoon.
You have few spikes.
They all look like this:
spike in scrpit, same spike in physics and same spike in frame time.
My guess, all that spikes are when script do something like creation or destruction of ball.
There is no problems here. That spikes are normal.

Now look at Warlord.
You have huge spikes in "script".... well over 300ms. It is a lot.
That spikes are very regular. There is slow function executed every 500 ms or 1 sec (from chart i can't give exact number).
Again in script there is a lot "eval" & "execute".
I know, that script look good with that "eval" and "execute" command, but i blame it. (Maybe i'm wrong).
I will look at that scripts in few days. I will present here "solution".

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 1:07 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1704
Location: Arkansas, USA
Rafal,

Thanks for looking at the data. I didn't notice the charts but I did notice the numbers are nearly the same on Warlords for both frame rate and script. So I was suspicious of the script.

One thing that is quite odd is the guys that use Windows 7 are not having trouble with Warlords. Whitey has a lower end Win 7 PC he is using on his cabinet and it plays Warlords better than his higher end desktop PC that is running Win 10. It doesn't make sense to me.

George


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 8:06 am 
Offline
User avatar

Joined: Fri Jul 02, 2010 4:50 am
Posts: 1114
Location: Paris - France
For me, it's a DirectX, ddraw, ... problem due to Windows 10

_________________
Les cons ça ose tout. C'est même à  ça qu'on les reconnaît.
My tables avalaible at http://www.pinsimdb.org/fpreleases/ and http://www.irpinball.org/
Image
Image
Le prix s'oublie, la qualité reste


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 10:03 am 
Offline
User avatar

Joined: Fri Jul 02, 2010 4:50 am
Posts: 1114
Location: Paris - France
War Lord with Windows 7

Attachment:
WarLord_W7.jpg


You do not have the required permissions to view the files attached to this post.

_________________
Les cons ça ose tout. C'est même à  ça qu'on les reconnaît.
My tables avalaible at http://www.pinsimdb.org/fpreleases/ and http://www.irpinball.org/
Image
Image
Le prix s'oublie, la qualité reste


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 10:38 am 
Offline
User avatar

Joined: Fri Jul 02, 2010 4:50 am
Posts: 1114
Location: Paris - France
Same but changing execute with eval. Execute is really more heavy than Eval.
In 50 ms (and every 500 ms)
Before: 41 Execute and 90 Eval
After: 11 Execute and 120 Eval

Attachment:
WarLord_W7_2.jpg


You do not have the required permissions to view the files attached to this post.

_________________
Les cons ça ose tout. C'est même à  ça qu'on les reconnaît.
My tables avalaible at http://www.pinsimdb.org/fpreleases/ and http://www.irpinball.org/
Image
Image
Le prix s'oublie, la qualité reste


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 1:59 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
I think, that Antivirus may make huge difference here.

Many malvare programs hide dangerous stuff in plain encrypted text. That text after decoding is passed to functions like "execute" in script. Every time, when "execute" is called AV program should check that text if it is safe. On computer without AV it will take some time, but on computer with "stupid" AV it may be 0.3 second and it will destroy gameplay.

Effect of Poppote replacment of execute commands with eval:
41 x execute => ~19ms
11 x execute => ~4.2ms
It saves ~15 ms in frame time. This is big difference.

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 2:38 pm 
Offline
User avatar

Joined: Fri Apr 22, 2016 6:52 pm
Posts: 29
Location: Vienna, Austria
You evil geniuses!!! :)

I turned off my antivirus to see if it made a difference when playing Warlock or Astrohits, and guess what - NO frame drops whatsoever!!! Even on the highest settings. This is amazing!!!

So now we know where the performance issue lies.


Top 
 Profile  
 
 Post subject: Re: Performance monitor
 Post Posted: Sun Mar 05, 2017 6:38 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1704
Location: Arkansas, USA
I too like Whitey have tried turning off real time protection of Windows 10 Defender while playing Warlock. My frame rate stays set at 60 frames per second as it should. It plays perfectly. I also have the software "Malwarebytes" installed which also has real time protection but it doesn't cause any performance problems on FP.

Warlock with real time protection on Windows 10 Defender turned off
Image

I'm not currently have trouble with the frame rate on AstroHits although its performance doesn't look great on Rafal's new chart.

It is nice to be able to play Warlock although I don't really want to turn off Defender's real time protection. Is there a difference in the Windows 10 version of Defender and Windows 7? It is odd that Warlock plays fine on Win 7 but not Win 10.

George


Last edited by GeorgeH on Sat Dec 16, 2017 5:49 pm, edited 2 times in total.

Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 6 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: