B. It's iterative. Knowledge doesn't stick until you see how it's applicable. By doing, you see the applications and learn faster.
A is useful in some situation, namely when you can't start or don't want to start yet. A big enough project may need a year of reading before you even start.
Generally you should read enough until you are highly motivated to do the work. And once work slows down, read some more.