Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: First time mame load time  (Read 3279 times)

0 Members and 1 Guest are viewing this topic.

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
First time mame load time
« on: July 15, 2013, 08:01:01 pm »
I have an older machine (Pentium 4 3.4GHz), but most of the MAME games I have run fine on it.  However, I notice that launching MAME the first time takes much longer than all subsequent launches.  I assume this is because Windows caches it the first time you launch.  This does take away from the frontend experience, though, when you press start for the first game and have to wait about 15 seconds or so for anything to happen the first time.  Is there any good way to automatically pre-cache MAME so that the first-time startup cost happens at machine startup rather than when you try to launch the first time?

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: First time mame load time
« Reply #1 on: July 16, 2013, 07:20:36 pm »
Could you do something like "MAME -? > null" as a batch file in your startup?

That would at least launch the .exe once at load time, perhaps it'll still in the cache by the time your FE loads up and you try launching a game.

Acids

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 184
  • Last login:Today at 06:43:45 am
  • Bring It.. Smart arse!
Re: First time mame load time
« Reply #2 on: July 17, 2013, 05:57:41 am »
I have an older machine (Pentium 4 3.4GHz), but most of the MAME games I have run fine on it.  However, I notice that launching MAME the first time takes much longer than all subsequent launches.  I assume this is because Windows caches it the first time you launch.  This does take away from the frontend experience, though, when you press start for the first game and have to wait about 15 seconds or so for anything to happen the first time.  Is there any good way to automatically pre-cache MAME so that the first-time startup cost happens at machine startup rather than when you try to launch the first time?

what os are you running? how much memory? what version of mame are you using?  are you using a front end?
To help we are going to need more detail.

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
First time mame load time
« Reply #3 on: July 17, 2013, 10:42:12 am »
Windows XP SP3, MAME 0.148, Hyperspin, 2GB.

But it starts slow the very first time whether I launch from Hyperspin or standalone. All the games themselves run at full speed and after first launch, subsequent times it launches in about 1-2 seconds.

Tried the batch file. Good idea, but it didn't seem to make a noticeable difference.

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: First time mame load time
« Reply #4 on: July 18, 2013, 07:18:31 am »
never noticed this myself, and WinXP should only be loading what it needs.

Unless you've done something stupid like compress the drive / exe?

or the drive is failing and has dropped down to PIO mode and is therefore just plain slow?

or some really bad anti-virus that wants to load the whole file into ram the first time?

or you're letting one or more drives in the system spin down, and they need to spin up from that state the 'first' time you launch it?  (could be a drive referenced in the rom path or whatever if you have multiple drives)

« Last Edit: July 18, 2013, 07:21:53 am by Haze »

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 745
  • Last login:Today at 01:43:25 am
  • I want to build my own arcade controls!
AW: First time mame load time
« Reply #5 on: July 18, 2013, 07:46:13 am »
It's actually like that on all my machines. It may be connected to disabled services like prefetch etc

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
First time mame load time
« Reply #6 on: July 18, 2013, 09:40:37 am »
Haven't done any of those stupid things and it's a pretty simple setup.

Single, new hard drive that everything's on. I do have Microsoft Security Essentials as my anti-virus. Wouldn't be shocked if it did something stupid, but I vaguely remember it being like this before I installed that.

rpgposer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 31, 2018, 11:46:12 am
  • PSO lover.
Re: First time mame load time
« Reply #7 on: July 18, 2013, 10:08:18 am »
Interest piqued.  My cab PC is similar - P4, winxp sp3, but I have two drives.  OS and data.  Mame and roms are on the data drive.  Did some googling and found out some stuff about windows prefetch.  The internets say that the prefetch folder holds 128 peristent entries, with the oldest overwritten afterwards.  Removing "cleaning" entries doesn't help performance.
mame on this pc seems to load about the same speed every time.
Whatever is going on IMHO is not prefetch related.
Never met a game I won't keep.

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 02, 2025, 09:03:11 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: First time mame load time
« Reply #8 on: July 18, 2013, 10:56:50 am »
how long does it take you to open mame and run the game without the front end?
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

Dawgz Rule

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 737
  • Last login:August 22, 2024, 07:18:55 pm
  • The more people I meet, the more I like my dogs
Re: First time mame load time
« Reply #9 on: July 18, 2013, 12:19:07 pm »
I am running a similar config and have never seen this issue. I also don't run any AV as the machine is never connected to the network.  Some suggestions:

1. Uninstall AV and see if issue still exists.
2. Disable all power saver features, including those that may be set in the bios.

Do you do anything to optimize performance when you install XP or do you pretty much plain vanilla the install?

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
Re: First time mame load time
« Reply #10 on: July 18, 2013, 12:25:10 pm »
I'll have to time it without frontend tonight when I get home.  It's pretty much a plain vanilla install except for disabling of some features -- I followed the steps in this awesome post to turn off splash screens, simplify gui, auto-login, etc.:

http://forum.arcadecontrols.com/index.php/topic,53467.msg524092.html#msg524092

I believe all the power saver features are all ready off in XP and the bios but I'll double-check.  Definitely the screen saver is off.

I figured the AV would be a really good idea while gathering the various programs and roms for my setup.  Once it's all buttoned up I was going to turn off the wifi as well as the AV so it's completely disconnected.

epetti

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 344
  • Last login:September 14, 2023, 10:15:20 pm
  • I want to build my own arcade controls!
Re: First time mame load time
« Reply #11 on: July 18, 2013, 11:23:43 pm »
Looks like it's at least mostly anti-virus fault.  When I turn off real-time monitoring for anti-virus the first time load is about 4 seconds.  Subsequent times are instantaneous.  When I turn it on, first time load is about 10-15 seconds and subsequent are 1-2 seconds.

There's still a delay that first time, but 4 seconds is reasonable.  It's fast enough that you don't start wondering whether you really pressed the button or not.

Dawgz Rule

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 737
  • Last login:August 22, 2024, 07:18:55 pm
  • The more people I meet, the more I like my dogs
Re: First time mame load time
« Reply #12 on: July 19, 2013, 09:54:24 am »
Good to hear.  I will check my load times later today just to see if I also see a slight delay at the first start.   :cheers: