Practice does not make perfect. Perfect practice makes perfect. If you keep repeating the same mistakes over and over again, you gain nothing.
Focus first on playing all the notes in the right order. Don't worry about the timing at all, even if it takes several seconds to move from one note to the next. Once you can play all the notes, then you start to work on the timing, playing gradually faster and faster until you have both the melody and the rhythm mastered.
The idea is that once you have memorized the correct movements, it's much easier to work on the timing. If you start playing too fast and make mistakes, you'll start to memorize the mistakes.
"Slow, well done, steady."
[as opposed to aerobics shake-it-all with music "gymnastics"]