some performance tweaks for the dagwriter write path