The root cause found in the heap dump (the watchlist loading all recent events in memory before filtering them) no longer exists: the watchlist and activity stream were moved to the attic in XWIKI-17471 (12.6), and replaced by Notifications.
With the current code, the reported scenario does not put any event in memory for later emails anymore:
a user is only queued for a notification mail about an event they listen to, and the own events filter (enabled by default) excludes the events triggered by the user themselves, so the single Admin creating the pages is never queued
the event store queue is bounded and blocks the producer when full, and the Solr indexer queue is bounded too (solr.indexer.queue.capacity, 100000 by default)
Closing as no longer reproducible. The remaining risk of loading a whole period of events in memory for the periodic notification mails (e.g. a user watching the space with daily mails) is tracked in XWIKI-17610.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.