Keep it simple, keep it generic
Keep It Simple
Most NPCs the party meet they aren't going to beat up, cast spells at or do anything more than chat to and have a couple of skill rolls against.
I have a long term game where there are hundreds of NPCs, most of these are nothing more than a name a class and a brief description of appearance, personality and a quirk so they are memorable. Eg
Magister Yi - Male Ice Elf Wizard 12 - Carries staff that smells of
Sulphur. Speaks in short sentences. Polite. Nervous.
And for that NPC that's all I need to know. Do I need to know which magical items he has, what his strength bonus is, nope! The players just speak to him and I can RP.
Bodge it at the last moment
If I need a saving throw, I just check what it is for his level, add a appropriate gestimate for a stat and maybe a resistance item and then note it next to his character for next time.
With this you can cut down the work you need to do immediately.
Certain NPCs you may need skills for; I have all my NPCs in a giant google word document referenced by location, if an NPC needs a skill again, I work it out; which for Pathfinder is pretty easy anyway.
Say I need to work out if Magister Yi spots something, Perception. Pretty key skill for anyone and he's a Wizard so he'll have bucketloads of skill points. Level 12 = 12 skill points. Wisdom? Not for a wizard usually. He's an elf, +2. So it's +14, easy. There's not much point worrying about a skill point here or there in the long term, it basically boils down to if the NPC is good/bad/amazing at a skill or whatever.
Keep It Generic
Look in the excellent pathfinder NPC book (Which are all helpfully online here: http://www.d20pfsrd.com/bestiary/npc-s ); there are dozens of stock characters there, these can the basis for anything, so if you suddenly need a warrior then grab one of those, tweak a couple of stats and then you're off. So the party meets a barbarian that uses an axe? Pick the stock Barbarian character, change a couple of things, alter the damage dice. Done.
When to Generate it all?
Finally there are the unique important characters the players are going to fight or are key important obstructions, companions or movers and shakers.
These are the only ones you really need to detail, they're unlikely to live very long unless they're a recurring villain (annoyingly) but these are the ones you should work out full stats for, for when the players pull some obscure combat tactic on them.
Of the 200+ NPCs I have detailed for my game world there are, count them, about 20 characters I have bothered detailing in full. That's 10%. 10% of the work to do? That's what I like, I'm a lazy GM :)