Recently I've noticed that my game will start to lag randomly when I am playing. I checked my task manager and I notice that java will use up a whopping 50% to 70% of my computer's memory. I've tried to reduce my video settings as much as possible (graphics, clouds, render distance, smooth lighting, particles etc) but it doesn't seem to help. The only thing that seems to have helped VISUALLY is reducing the max fps to 40 (before it was unlimited), but this does nothing to fix the extremely high memory usage. I have also tried turning off the resource pack I'm creating (32x) but this doesn't help either. I cannot find any online resources that are helpful. I don't think I had much of a problem with this before 1.15 either, but it has been a while since I have played.
Processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
GPU: NVIDIA GeForce 840M, Intel(R) HD Graphics 4600