NSPopover in NSTextView With Links Is Broken: Accessibility Hierarchy Slowdown

Calling NSPopover.show(relativeTo:of:preferredEdge:)
with a NSTextView
as the positioning view will slow down your app the more links your text view contains. I discovered this with auto-completion popovers in my note-taking app The Archive and hunted down the issue. In notes with ~100 links (hashtags, web links, wiki links, …) displaying the popover with completion candidates was much slower than in short/empty notes. The slowness scales linearly with the amount of links, and is related to accessibility children iteration.