Animation Lag

I've been having issues with animation lag in playtesting. It seems to occur mostly in animation heavy cutscenes and battles.
I select a command and the game just freezes sometimes up to a good 15 to 20 seconds in extreme cases before executing the animation. This usually happens at the beginning of playtests. Once a few minutes have passed the issue sorts itself out.
If I try to end playtesting during these lags the game screen disappears like it is supposed to but the music keeps playing for about 30 seconds and I am unable to do anything.
I can't tell if this is due to my programming or my computer itself.
Any suggestions or advice to stop this? Has this happened to anyone else?

EDIT: Another pattern I've noticed is that if it is the first time a certain animation has been played in the game or if it has been a while since the last time said animation was played, it is almost guaranteed to have a delay.
It is because of the way MV caches the images. If your battle is animation-heavy, the first time an animation is called, it needs to load all the images, and animation images are larger than most others. Once it's loaded everything, it remains in cache, which is why it all speeds up again after the first time.

You could try a preloader plugin (though the ones I've seen are for preloading maps, not battle animations). Perhaps a plugin coupled with an event on the map that never gets run (condition the first page by self switch A, and never turn it on), which has a Play Animation using all the animations you want in your battle.

There will still be lag, but it will be as the map is being loaded, which is a more natural place for the player to have to wait a bit.
Hmm. I found a plugin that seems to be doing the trick. It's still a bit too soon to tell for sure though.
http://sumrndm.site/preloader-core/
ooh, that's nice - you get to specify which ones you want to preload.

Original thread: https://forums.rpgmakerweb.com/threads/animation-lag.112351/