Heat the oil in a large frying pan, add the potatoes, onion and a little salt and fry over low heat for about 20 minutes, stirring occasionally, to prevent sticking and browning.
Beat the eggs in a large bowl. Lift the potatoes and onions out of the pan with a slotted spoon and stir them into the beaten eggs, adding a little more salt and some pepper, Set aside to soak for 10 minutes, Pour off the oil, reserving 3 tablespoons
Return 2 tbsp of the oil to the pan and heat until hot. Add the potato mixture, reduce the heat and cook gently for about 10 minutes, until it is golden underneath and almost set. Carefully flip the tortilla on to a large plate so the cooked side is on top. Add the remaining oil to the pan, ease the tortilla back in, and cook the second side for about 5 minutes.