Details
Description
Collection::deleteDocument currently takes a RecordId value as parameter, and then queries the collection for the actual document. However, many of the callers of the method already have the document, as well as the location. Instead of just passing in the record location and redundantly looking up the document from memory, pass the document directly into the method as well and save an extra disk call.