Speed in xref writing