When we fly out of LAX we usually leave SD about 4 hours before our flight so we have enough time to get there and check in. We don't have to wait in lines for security and check in, but we'll leave earlier to factor that in when necessary.
Friday afternoon traffic in SD on the 5N is also pretty bad. It will probably take you about 40min from La Jolla to get to Carlsbad on a Friday afternoon and that traffic starts anywhere around 1pm. Also depending when you're here the fair will be in Del Mar which adds even more time on the commute.
So for sake of sanity I'd leave San Diego around 11am to beat traffic and have time up in LA to not be rushed.