Lag spike only when loading large save files?

Discussion in 'RPG Maker MV' started by Rozel, Aug 28, 2017.

  1. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English
    I have tried these with and without plugins, on different maps, and with/without the usual parallel processes (of which I usually only have one or two, and they have waits).

    When I start a new game, no lag.

    When I start a new game, save, then reload that file, no lag.

    However, if I load into that same spot on a save file with an hour or more on it there's a lag spike about a second after loading in the file. (I say an hour plus, but I haven't tested stuff like 30 minutes so I don't know exactly when it starts to happen.) It's a brief freeze of the whole game.

    My game is going to likely be 12+ hours and while this only happens at the start of loading, so I'm sure it's not too annoying, it still bothers me and I'd like to know if there's some way to fix it. I'm particularly worried about the lag getting worse with larger save files.
     
    #1
  2. Tricimir

    Tricimir Veteran Veteran

    Messages:
    50
    Likes Received:
    14
    First Language:
    English
    Primarily Uses:
    RMMV
    That doesn't really make sense. Save files should always be the same size, regardless, for a given game. They're always storing the same amount of information, just different values for it.
    this is just a shot in the dark but is it possible you've turned on and left running some parallel process events or something like that? That would explain why there might be lag later in the game where there was none earlier. and it might only show up on load because MV frame rates tend to stabilize once they're loaded. Maybe it's not the save file itself so much as all your systems and events all trying to start up at once?
     
    Last edited: Aug 28, 2017
    #2
  3. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,402
    Likes Received:
    12,634
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Tricimir : False. I'll explain why below.

    Save files have to save all of the switches, variables, and actor data, as well as all data for all events in the game. Else, how would your game know that self switch A is on for event 16 on map 292? So the more maps you have, the more it has to save. Also, plug-ins add more data to your save file, as the save game has to store any extra variables your plug-in has added. So if you use a plug-in to add an extra stat to all actors that you call Awesomeness, that has to be saved for every actor in the game, else it will not know of any adjustments that have been made to the stat.

    So if you want to keep save file size low, the best solution is to use few maps and few plug-ins.
     
    #3
  4. Tricimir

    Tricimir Veteran Veteran

    Messages:
    50
    Likes Received:
    14
    First Language:
    English
    Primarily Uses:
    RMMV
    I believe you misinterpreted what I said.
    I said a save file would always be the same size for a given game.
    As in, it wouldn't mater if a save file is at the beginning of a game or in a final area, as long as it's still for the same build of the same game, (which is what he was concerned with) it'll always store the same amount of information. Obviously if you add maps or more switches and variables to a game that'll make the save file larger, but it wouldn't have the effect he's describing, because the game is still keeping track of all of those things even before they ever come into use.
     
    #4
  5. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,402
    Likes Received:
    12,634
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Good point. I thought you meant for all games in RPGMaker.
     
    #5
  6. Tricimir

    Tricimir Veteran Veteran

    Messages:
    50
    Likes Received:
    14
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, I figured. Sorry, I probably could have worded it more clearly.
     
    #6
  7. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,402
    Likes Received:
    12,634
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    NP. It was 7 am my time zone when I read that, so I'm still not 100%. Must get more caffenie!
     
    #7
  8. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English
    Ok, so my theory was wrong. Thank you for explaining! But I'm not sure what it could be, then.

    I tried it on a map with no events whatsoever, as well as with no plugins activated. It doesn't lag on a new game, doesn't lag when I load a save I made after starting a new game, but lags when I load in on that spot with my 1+ hour saves.

    I made sure to test several times and to double-check everything. Is it possible that something from a plugin 'lingers' even if the plugin is disabled? I do use one with persistent variables and switches, I'm not sure if that matters though. Just trying to get ideas.
     
    Last edited: Aug 29, 2017
    #8
  9. Tricimir

    Tricimir Veteran Veteran

    Messages:
    50
    Likes Received:
    14
    First Language:
    English
    Primarily Uses:
    RMMV
    I've heard of plugins having nebulous effects even if they're disabled, though it's kinda rare and they're really not supposed to be able to.
    I'm going to assume you don't have any common events running, because that would be the obvious answer.
    Was the save file that's lagging made before or after you've made all these changes? Because stuff like removing a plugin or disabling one, or even adding new stuff to your game can make old saves incompatible and cause some very strange stuff.
    If it's none of those things I'm pretty much out of ideas.
     
    #9
    Rozel likes this.
  10. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English
    Ok, that's probably it. I've had these saves for... maybe almost a year? And have since added/removed certain plugins. I also left on a new save for awhile and it didn't have any issue, so yep it's probably not about play time but rather the saves themselves having gone through a lot of plugins.

    Thank you for patiently helping me with this.
     
    #10

Share This Page