Your ram problems, have nothing, absolute 0% - not a single bit to do with latency. Latency is the consistent rate of ping, ergo, how fast your computer/application is communicating with whatever it is wanting connect to on the internet.
If you want to determine if the problem lies with you
(you being, you computer, another computer on your network, your router, or your modem) run a TRACERT -
https://us.battle.net/support/en/art...g-a-traceroute - this article explains how, and gives sample wow address to try. The key here are the "Ping" numbers in MS - you will probably see a large spike somewhere in where it goes upto your 300-600ms, if this is after your modem(probably the third+ jumps, 1 being your router, 2 your modem if its separate) - if your see said spike outside of your network, it is a routing issue out on them internets(this does happen, more then people realize), contact your ISP (The people who give you the internets) - it will be a long and arduous process, and you will jump through tons of loops, but they will fix it eventually. Be persistent.
If, the problem lies inside your network, consider the following, any software running on any computer that requires a constant connection to the internet can affect your ping. This can include software updaters, voice and communication software, messengers, etc etc. Turn off all other computers, close all open applications, check the system tray or the task manager to ensure you close
EVERYTHING. All software, antivirus, anything you can close, close it. Try wow again, fixed? Good - something was getting in the way of your wows internets. Reboot and continue this process, each time closing less until you figure out which application(s) are causing the problem. Not fixed? Consider what else might be running on your network, VOIP phones, cable TV, etc and all have an effect if not setup properly.
If all else fails, buy a new router that has QoS or you can install DDWRT on, set both wow and your computer to be #1 in priority, and laugh away.