Local activities have to be recorded as they are not reexecuted on replay. One possible optimization is to not include arguments into the marker event as they are there only for human consumption.
Set LocalActivityOptions.doNotIncludeArgumentsIntoMarker
to true
to not include them.