improve perf of writeEntryToOplogRefs