Looks like an issue with your keyboard. Make sure that you're pressing the keys down properly, and ensure that it's plugged in to the computer correctly.
Try walking backwards or to the sides. Do not press W. If the problem does not occur with those directions of movement, it is your keyboard as @Techy4198 suggested. Try using another keyboard and ensure the contacts in the USB port are clear of any debri.
I believe your problem is part graphic and part memory related.
If you were to activate the Debug screen (F3) and watch memory usage,
you would probably see Usage amount approach the Allocated amount, then the game
would freeze for a moment as Garbage collection occured and usage dropped.
then it start up all over.
I suggest you use the following JVM Arguments in the profile editor.
Notice that -Xmx3g is setting the maximum memory Allocation to 3GB, because I don't know if you are
using 32bit or 64bit java and 32bit Java has a 3GB allocation limit.
If you're using 64bit java, then it can be as high as 1/2 of what is installed ( in your case 6GB since you have 12GB installed),
but you are unlikely to need more then 3-4GB unless you have hundreds of mods installed and Vanilla should never need more
Here's the configuration:
Dell XPS 8700
I7-4770
12Gb DDR3-1600
AMD R9 270
OCZ VERTEX 3 SSD
I'm getting weird lag, no big framerate drop but rather a stuttering.
It happens in local game, didn't try any servers.
My minecraft is Vanilla
The computer is installed with brand new Windows 8.1 64bits
Java version is the latest (freshly installed)
Minecraft is at latest version too (1.8.1)
I don't get it.
I even put every video option down to the lowest possible settings, and it is still happening.
Here's a video of it :
Check out my GitHub and Website!
If you were to activate the Debug screen (F3) and watch memory usage,
you would probably see Usage amount approach the Allocated amount, then the game
would freeze for a moment as Garbage collection occured and usage dropped.
then it start up all over.
I suggest you use the following JVM Arguments in the profile editor.
-Xmx3g -Xms256m -Xmn128M -XX:PermSize=64m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+UseCMSCompactAtFullCollection -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy
Notice that -Xmx3g is setting the maximum memory Allocation to 3GB, because I don't know if you are
using 32bit or 64bit java and 32bit Java has a 3GB allocation limit.
If you're using 64bit java, then it can be as high as 1/2 of what is installed ( in your case 6GB since you have 12GB installed),
but you are unlikely to need more then 3-4GB unless you have hundreds of mods installed and Vanilla should never need more
then 2GB.