This riff is four bars long, in E minor and a time signature of 12/8. If you’ve never played 12/8 before just think 4/4 with consistent triplets. You can see the four groupings of three notes in the rhythm of the riff below.
Chunk it up!
The key to playing longer riffs like this is to split them up into smaller sections. First of all we can split this riff into half and see it as two chunks of two bars. Then we simply split each section up into smaller phrases. Each phrase is two beats in length giving us four phrases in each section.
Simply focus on learning each phrase in isolation. Learn the phrase, practice it until you have it under the fingers and able to play it at roughly the original tempo. Then focus on the next phrase. Build up to speed then combine both phrases together. Build up to speed. Move on to next phrase and so on.
This is a great way of building motivation when learning longer, tougher lines because you fulfill short term goals and feel a sense of achievement at each point. This is in direct opposition to the popular method of learning an entire line and working on the whole thing over a prolonged period of time.
Try it out!