"How long should I be spending on a painting? It's taking me three hours for a portrait, and five hours for a landscape, but it's really worth it when it's done." -E. Y.
How long a painting should take you to do is impossible to say. There may be some technical differences with specific paints, like drying time for oil versus acrylic. However, the actual completion of the painting depends on every individual artist, their painting skills, and what they visualize the painting to be.
Some famous artists have taken months and even years to finish a painting. The 19th-century French artist Ernest Meissonier took 13 years to finish his painting Napoleon's victory at Friedland which is 53 1/2 by 95 1/2 inches in size. Ingres took a decade to paint his Madame Moitessier, though he did put it aside for a while, he didn't spend all that time working on it!
If you fuss with a painting for too long, you run the risk over overworking it. If you declare a painting finished too soon, you run the risk of not developing the idea to its full potential. If in doubt about whether you should stop or continue with a particular painting, you should consider creating another version of the painting or creating a series on the subject.
Ultimately it's not about how long a painting takes, but about how pleased you are with the result. Finishing a painting in no time at all isn't, by itself, an achievement. It's what the painting looks like that's the achievement. Certainly, if you're living by selling paintings, being prolific means you've more work to sell. On the other hand, a successful but slow artist can end up in a situation in which their work is in such demand they (or their gallery) have a list of clients after their next painting, whatever it is.