To an extent it is a ram issue, but the game will slow down as more and more units get built.
If you look in the Victoria tech support forum, you will find a FAQ by jpd on game slow down, everything in there applies equally to HOI2.
If you look in the Victoria tech support forum, you will find a FAQ by jpd on game slow down, everything in there applies equally to HOI2.