Hi! I have flown San Diego --> Dublin countless times and what I have learned is that if you can do your long stretch of your trip from California to Europe first (layover in Europe), then you benefit from the inflight entertainment and more spacious plane for longer of your journey. The flight from London/Paris to Dublin will be short and on a much, much smaller plane (probably without inflight entertainment unless you pay for a fancier class than economy). If you fly California to O'Hare or somewhere on the East Coast, your first leg will be one of those 5 hourish flights on a moderate/small size plane and then another 5 hourish, potentially moderate sized plane to Dublin (if you are lucky, they sometimes have the nice big plane).
Honestly, it depends how you like to break up your flights. Two roughly equal legs with a break in the middle, or one long flight to sleep on and then a short one. I tend to prefer the latter. Going USA --> Ireland you will only do immigration in europe (in Dublin airport, which can take ages if you happen to get in the NON-EU line along with lots of other Americans). On the way back Ireland --> USA, I STRONGLY recommend having your first port of entry in the USA be your final destination. Otherwise, if you have a layover in the USA going back, you will need to retrieve all your checked luggage, go through security, recheck all the luggage, and reenter the normal part of the airport all on that layover (it can take hours). At least if you have to do this at your final destination, you aren't risking missing a subsequent flight.