Fry the onions very gently in half the olive oiluntil very soft and golden brown. This will take about 30 minutes. Sprinkle over the sugar and cook for a further 3-5 minutes, until caramalized. Leave to cool.
Beat the eggs with the parmesan, thyme, parsley, salt & pepper. Stir in the onion.
Heat the remaining oil in a heavy based frying pan. Pour in half the mixture, making sure it gets its proper complement of onion. Reduce the heat to moderate and cook until almost set through. Lift out of the pan and invert the fittata back into the pan, uncooked side down. Cook for a couple more minutes until the underneath is slighly brown.
Serve or keep warm while you cook the remaining frittata in the same way.