@startsts
Awesome work digging up the problem and implementing that solution. I'm going to make that change in my copy of that file now too...
It makes few sense if you wallet.dat is small. Actually I didn't implement anything. The dev (when he will exist) should add launching parameter to manage that wallet flushing interval
Like I said, we are going to migrate to newest Peercoin code whenever we can. I wonder if this option has been added up there?