Every flowfile is held in memory for as long as the flowfile is in the flow, until it reaches a DROP event[1]. This means, that if you're writing a large attribute (such as a json) this will eventually add up to a large heap usage.
Keep in mind that the attributes also get stored in data provenance so there's also an impact there.
Biggest consequence to this a risk of NiFi going OOM, then failing to load the flowfile repository on startup.
If the flowfile repo is too large it can also take longer for NiFi to start up, or also go OOM on startup while trying to load the repositories.
This is also touched on the Anti-patterns video[2]
[1]https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#provenance_events
[2]https://www.youtube.com/watch?v=RjWstt7nRVY