In a large frying pan, heat a generous amount of olive oil over medium heat.
Add the chopped onions (and minced garlic, if using) and cook until they start
to soften.
Add the thinly sliced potatoes to the pan. Fry the mixture, stirring occasionally, until the potatoes are cooked and lightly browned.
While the potatoes and onions are frying, break the eggs into a large bowl.
Whisk them together with a pinch of salt and pepper.
When the potato and onion mixture is cooked, carefully transfer it to the bowl
with the beaten eggs. Stir well to combine.
Heat a little more oil in the pan, then pour in the egg and potato mixture.
Cook over medium heat for a few minutes, until the bottom is set and lightly
browned.
Place a large plate over the pan and carefully flip the tortilla onto the plate.
Then slide it back into the pan to cook the other side.
Cook for a couple more minutes, until the second side is browned and the eggs are fully set. You can check this by inserting a knife into the centre of the tortilla; if it comes out clean, the eggs are cooked.
Transfer the tortilla to a serving plate. Let it cool a bit before slicing and serving.
Notes
Feel free to add garlic for an extra punch of flavour.3 very large potatoes tend to weigh about 1 kg.