I suspect it will be quicker to read directly into the output list, then traverse the output list and the list of input IDs and insert empty contacts as required.

Also, the output list should be reserved with the size of the input ID list.