When I play Minecraft on my laptop it lags when I start to break a block then it breaks it. But after that, it places back in and makes me break it again. I also get a similar lag when I place blocks. I have an identical laptop that behaves normally even with the same settings, same JVM arguments, same version and same allocated ram which is 2 gigabytes.
Any help will be very appreciated!
My Minecraft client version is 1.12.2-Optifine_HD_U_E1 and my JVM arguments are
-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M