The problem sets that you usually get in a university course is a small fraction of the exercises in your textbook. Which raises a question: do you need to solve all the exercises from your textbook? Maybe the author just presents a lot of them so that your professor can choose those that fit his course.
I'm looking for a reason not to do all the exercises, or even only do the course's problem sets (a small fraction). For example, Pugh's "Analysis" claims to have more than 500 exercises—that's way to much; I think the bulk of them is not essential. The main idea of studying mathematics is to learn new mathematical concepts, and not get bogged down in routine computations.
What is the reason of the problem sets? Maybe just to check that you understand the concepts well. But maybe the problem sets are so small because they are meant to be checked by some person, otherwise they would be bigger.
EDIT: Especially it relates to the courses that you need as a prerequisite for the other much more important course. For instance, I need Linear Algebra as a prerequisite for Analysis. When I get to Analysis, I will do all the exercises. But I don't want to spend a lot of time on Linear Algebra—I understand the concepts, understand the proofs, and that's it.
I would say it somewhat depends on the level, but may be not that much actually. The following is how I did it myself when in self study mode, and no professor to oversee the progress.
As an undergrad, say in vector
analysiscalculus, I did all the theory problems and enough many of the computational exercise to feel confident that I can do the rest. At that stage if, upon reading another problem, I could see a way to do it, then I wouldn't bother unless the problem had some intrinsic appeal (at the time I didn't know whether I want to major in math or physics, so problems motivated by theoretical or celestial mechanics would often make the cut).As a beginning grad student it was more or less the same way, but as the exercises were largely theoretical I ended up doing most of them (they were fun actually). Later on it depended. If I only needed to get a general idea of the material, or felt eager to get to the next chapter, I would only a few exercises and try to move on. If I skipped too many of the exercises I would start feeling rather lost a few chapters further down. Then it was time to try the problems in the preceding chapter. If I couldn't, then I would go back to the preceding chapter, and so forth. Doing this iteratively worked quite well for me.
Of course, some more advanced textbooks don't have exercises. Then you need to make them up yourself and otherwise apply whatever habits have worked for you in the past.
The preceding paragraph is kinda my main point. You need to find a way that works for you. Lower level textbooks offer more repetitive work, and you can cut some of that. But at your own peril!