A big reason for poor performance: memory leak

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

durbal

Banned
58 Badges
Dec 9, 2015
3.739
9.757
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Imperator: Rome
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Shadowrun: Hong Kong
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Victoria 2
  • Age of Wonders: Planetfall Sign Up
  • Victoria 3 Sign Up
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Tyranny: Archon Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Age of Wonders: Planetfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
While in a marathon session today I noticed the game got almost unplayably slow and it made little sense since the world state had not changed much besides my tag growing. So naturally I wondered...was there a memory leak to cause performance to dip so much? I close the game and re-open it and the game is at least twice as fast.

I haven't heard anyone mention this, so figured I'd point it out to the community and the devs. If you notice the game is going extra slow, exit the game and go back in and see how much different performance is and share your experience.
 
  • 1Like
  • 1
Reactions:

MatthewP

General
52 Badges
Feb 8, 2017
1.776
5.250
  • Stellaris: Distant Stars
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Nemesis
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Europa Universalis IV
  • Stellaris: Galaxy Edition
  • Stellaris
  • Victoria 2
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Art of War
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Galaxy Edition
I’ve noticed this type of reload speed up occasionally for years. As for the memory leak:

1) Did you check memory usage? If your machine wasn’t very low on memory then a memory leak shouldn’t cause that much slowdown. I ask because a memory leak is a pretty specific thing. From what you’ve said so far, the possible causes seem broader: there’s something, or multiple things, about the state of the game when it’s been running for a while that sometimes slow it down versus a clean reload. For example maybe the AI gets into some expensive logic loops, or certain calculations get run even though they don’t need to be.

2) Whether or not there is a memory leak, I’d guess a memory dump of the game would be very useful. Save files probably are not since it won’t repro. I wonder if crashing your game next time and sending the error report from that dialog creates a memory dump? Maybe some dev knows.
 
  • 1
Reactions:

PDXJon

First Lieutenant
29 Badges
Apr 10, 2017
274
536
  • Europa Universalis IV: Rights of Man
  • Europa Universalis 4: Emperor
  • Imperator: Rome - Magna Graecia
  • Imperator: Rome Sign Up
  • Imperator: Rome
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
While in a marathon session today I noticed the game got almost unplayably slow and it made little sense since the world state had not changed much besides my tag growing. So naturally I wondered...was there a memory leak to cause performance to dip so much? I close the game and re-open it and the game is at least twice as fast.

I haven't heard anyone mention this, so figured I'd point it out to the community and the devs. If you notice the game is going extra slow, exit the game and go back in and see how much different performance is and share your experience.
I leave my game running all day. It’ll sit paused(monitor off) when I’m not playing. I’ve even forgotten that it was on and it sat there over night. I noticed maybe one or two times where the game slowed down. I just assumed some background utility started taking over the resources. I think the slowdown would be more common if there was memory leak issues. Memory leak is a game issue and not a PC one, right?
 

durbal

Banned
58 Badges
Dec 9, 2015
3.739
9.757
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Imperator: Rome
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Dharma
  • Shadowrun: Hong Kong
  • Imperator: Rome Sign Up
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Victoria 2
  • Age of Wonders: Planetfall Sign Up
  • Victoria 3 Sign Up
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Tyranny: Archon Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Age of Wonders: Planetfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
I leave my game running all day. It’ll sit paused(monitor off) when I’m not playing. I’ve even forgotten that it was on and it sat there over night. I noticed maybe one or two times where the game slowed down. I just assumed some background utility started taking over the resources. I think the slowdown would be more common if there was memory leak issues. Memory leak is a game issue and not a PC one, right?
Yeah, memory leaks are application issues. That also means that simply having it paused won't necessarily unused resources in memory to be disposed of, but certain actions will allocate rssources which are never cleaned up when they go unused (that's the leak).
 

Manwe_Sulimo

Major
38 Badges
May 21, 2019
594
1.014
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
  • Europa Universalis 4: Emperor
  • Victoria 2: A House Divided
  • Victoria 2
  • Europa Universalis IV
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Sword of Islam
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Cities in Motion
I leave my game running all day. It’ll sit paused(monitor off) when I’m not playing. I’ve even forgotten that it was on and it sat there over night. I noticed maybe one or two times where the game slowed down. I just assumed some background utility started taking over the resources. I think the slowdown would be more common if there was memory leak issues. Memory leak is a game issue and not a PC one, right?
This is a bit off-topic and of course I am not sure how much resources it costs when just running in the background and paused, but wouldn't it save energy to close the game when you don't play it? Assuming you at least turn off the computer when you don't use it ;-)
 

PDXJon

First Lieutenant
29 Badges
Apr 10, 2017
274
536
  • Europa Universalis IV: Rights of Man
  • Europa Universalis 4: Emperor
  • Imperator: Rome - Magna Graecia
  • Imperator: Rome Sign Up
  • Imperator: Rome
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
This is a bit off-topic and of course I am not sure how much resources it costs when just running in the background and paused, but wouldn't it save energy to close the game when you don't play it? Assuming you at least turn off the computer when you don't use it ;-)
I’m not sure what the difference in energy consumption would be between leaving the system idle or turning it on/off throughout the day. I hurt my back in a train wreck, so I need to take breaks from sitting. My intent is to go back to playing, but sometimes I get distracted and forget. It happens more often than I want to admit. I‘m curious how much juice is used at idle.
 

Lightbanee

Colonel
44 Badges
Apr 28, 2019
887
1.133
  • Imperator: Rome
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Age of Wonders III
  • Surviving Mars: First Colony Edition
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Stellaris: Synthetic Dawn
There is definitely a problem with the game, I had a planetary empire so things were getting pretty slow, when I turned my computer on the next day to continue it was suddenly much faster. But it does seem like the only fix if while irritating is just simply terminating the game completely and fresh restarting.