When is the best time to ask for letters of reference?
You can choose either of the options, but I would wait at least till I've had quite a few accomplishment. However, some professors take a long time to write, so it would be good to approach them at least a few months before you start applying. Letter of recommendation can be collected and filed till the time you need them.