During wiki creation, for each XAR extension that is installed, a XARImportedEvent is sent and the DefaultWikiComponentManagerEventListener receives it and re-registers all UIExtension components found in the wiki.
For example when installing the org.xwiki.enterprise:xwiki-enterprise-ui-wiki-8.0-SNAPSHOT XAR in a new wiki, this extension depends on 45 other extensions. And since there are 30 panels declared as UIExtension, this means registering 45*30 = 1350 UIX component. So this is slower than it should be.
In addition the code in DefaultWikiComponentManager.registerWikiComponent() does the following (see https://github.com/xwiki/xwiki-platform/blob/fb35fbb0d2efe2d751adfe07cca840246dece2df/xwiki-platform-core/xwiki-platform-component/xwiki-platform-component-wiki/src/main/java/org/xwiki/component/wiki/internal/DefaultWikiComponentManager.java#L110-L110):
So if you re-register the same UIX component this map keeps growing forever. This means that every time a new wiki is created the memory available decreases causing the memory leak.