Hi offonoffon...
  won't the creation of the vertices and edges one at a time end up dramatically affecting the performance of graph creation (see my original question at the top of the thread)?

Yes, and that has been solved already.  I was responding to "It's somewhat annoying to have to keep track of the vertices that will be created like this", and to the observation that your code is maybe not as flexible/reuseable as it could be.  And as I said, my code could be easily modified to add the edges as a batch instead of one at a time.