Actually...
Presuming you're talking about learning the entire Jaco Pastorius rendition of "Donna Lee" off his eponymous solo album -- including the improvised parts -- I think your best strategy would be to first learn the chord changes to "Donna Lee". Because:
- A) once you have memorized the chord changes, you'll be able to see that in fact it repeats several times over: Jaco plays the written head over the form, then his own improvisation over a repeat of the form (I forget if he takes one or two choruses) and then recaps the written head over yet another repeat of the form. (Or maybe the recap is over a truncated version of the form? I forget, it's been a while since I've listened to that version.) Knowing that the entire form repeats three or four times is invaluable in getting a handle on how to memorize the entire piece. But also
- B) once you have memorized the chord changes, you'll be able to analyze how the melodic phrases (both written and improvised) relate to those changes, and this will allow you to grasp larger groups of notes rather than having to parse each one individually. E.g., if you know that the second chord change is a G7 and then acknowledge that the melodic phrase in that measure is just a descending G mixolydian scale followed by a G dominant 7th arpeggio, it's much easier to remember what happens in that measure; the chord changes tell you what material to use, and the melodies (usually!) confirm that.