cayleygraph / cayley

An open-source graph database
https://cayley.io
Apache License 2.0
14.83k stars 1.25k forks source link

Bug with map allocation in iterator/materialize.go #911

Closed virtualgraham closed 4 years ago

virtualgraham commented 4 years ago

Description

In func materializeSet on line 206 of iterator/materialize.go variable mn is declared and assigned 0 value. However, this value is never modified in the function. This is perhaps because of a typo on lines 223 and 235. Instead of n = mn, it probably should be mn = n.

This would not produce an error since mn is just an allocation size. However it probably is draining some performance.