What is the purpose to clone the Event's fields so many times in processing event

There are many times to Clone Event's fields in processing event. The method Clone is:

// Clone returns a copy of the MapStr. It recursively makes copies of inner
// maps.
func (m MapStr) Clone() MapStr {
	result := MapStr{}

	for k, v := range m {
		if innerMap, ok := tryToMapStr(v); ok {
			v = innerMap.Clone()
		result[k] = v

	return result

Calling Clone will cause GC busy and impact the performance heavily. I find there is not a lock operatoration so this is not a concurrency issue. So I am confused. I need your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.