First im sorry for my english i know it's not very good but let's go to the topic. I was writing my new game and one day i was trying to start it on my sister's pc. The game was very slow and cpu usage went up to 30% on this particular app. The next day i brought it to school and the same happened cpu usage was very high and the game was slow. I was thinking what is causing that problem and i disable the overloaded draw function for the background and it worked, the cpu usage was now 6%, then i disable the overloaded draw function for the player sprite and the cpu usage went down to 0.2%. I noticed one more thing
https://imgur.com/H1PEx24. By the way on my own pc the game is fine the cpu usage is 0,1%. Ps i used the Window.setFramerateLimit(60) function.