Can't get rid of lag spikes

Need help installing the mod?
5 | 0
I've started playing Median XL a week ago, having alot of fun, but there's lag that i can't fix. Its happening randomly, like big lag spikes. Its not a server problem because it happens in offline play aswell. Anyway, i tried changing the server im on and it doesnt help.
I have tried to change the compatibility of D2 to windows XP and i've tried changing to windowed mode and changing the glide settings accordingly but it doesnt help.
The lag can happen if i talk to an npc, or in fight, maybe because of certain animations, i don't know.
Is anyone able to help me ? I would love to play this game but the lag spikes are hard to deal with.

Thanks !