Memory and FPS in Rust: how to remove freezes and adjust graphics