With limited programming-knowledge, I feel that it’s normal that you are gonna build a game that is quite unoptimized. At least at your first attempt when making new functions. But thankfully, a lot of those issues can be fixed by small adjustments or refactorings of the code. My game got to a point where the FPS was below 25, which I found quite weird, seeing as how small the game still is. At an earlier point I talked about the need for Culling - as “drawing” is one of the, if not the most performance-heavy thing the engine does. But there were other things in the Draw-Event as well, that hampered my performance.
By making some of these functions in the Render-object dependent on user actions (like only closing all menus, when there are actually menus to close - duh), I managed to get my performance back from 25 to 140 FPS. Sometimes it’s the small things, really. But it’s a good reminder that, while your performance is not the most important thing in a lot of settings, the performance can be a good indicator where you have written bad code and should look over it again.