Getting constant lag in minecraft that started recently, why?

Getting constant lag in minecraft that started recently, why - 1 Added (1). I have 4 gb of ram, windows 8.1, and my settings aren't super high, and i'm using 3 gb of ram on this profile, i'v been getting lag since a few days ago and i don't know how to fix it, i'v uninstalled and re-installed java, i have a intel core i5 processor, please help this is my fav game and i can't play with so much lag, also, when i was playing in a modded world with optifine, when i clicked f3 to show the fps and stuff, i got a tall green bar that started in the left and slowly move over a bit Added (2). The green bar was top to bottom of the screen, can someone tell me what that means, and it would reach a point on the screen, and then that bit of green would become a darker green then it would start all over again, and i was lagging at 2 fps on tiny rendering and fast graphics and no smooth lighting, please help

Its due to the fact that microsoft bought mojang XD. No but really, I would check and see how much RAM your computer is using while running the game. Make sure you don't have anything resource intensive running while you are playing the game, this will decrease performance greatly.

You could alternatively try changing some of the graphic settings, enabling of disabling OpenGL and enabling or disabling Vsync.

If you had installed any mods recently, the interference from other mods may have caused a huge drop in frames (also just having a sheer amount of mods on a bad computer can do the same). Try removing the mod that you just installed and see if the performance increases.

Either mods, or make sure you have your drivers updated (I don't know why) and that the game is not running on integrated graphics.
Ask Steve. He knows everything.

Either mods, or check that you've got your drivers updated (I do not know why) which the sport isn't running on integrated graphics.
Ask Steve. He is aware of everything.