Delete global accounts takes very long time

Deleting global accounts takes a very long time. Timespan from pushing the “Delete” button to see “Done” message is about 55 seconds. If I delete a test article in the global wiki (but not space “XWiki”) it’s deleted immediately.

There are no console errors but the network tab shows

/bin/get/XWiki/ACCOUNTNAME?xpage=delete&jobId=refactoring%2Fdelete%2F1695636309466-905&outputSyntax=plain&logOffset=0

46 times.

We are using:

  • XWiki 13.10.6
  • Ubuntu 20.04.4 LTS
  • Apache Tomcat/9.0.31
  • mariadb Ver 15.1 Distrib 10.6.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Any ideas how to improve this?
Simpel

Could it be related to:

?

BTW are you using implicit all group (see also Loading... )?

Thanks

We have only one subwiki beside the global wiki (what btw. has nearly no articles but all accounts). The subwiki has about 8.500 documents. The main wiki has about 4.300 accounts.

We have a 1:1 copy (TEST) of our wiki (PROD) with exactly the same amount of articles in subwiki and accounts in main wiki. Deleting an account in TEST took 18 seconds only. It’s much more longer then deleting an article but only 1/3 of account deleting in PROD.

xwiki.cfg says:

#-# Should all users be considered members of XWiki.XWikiAllGroup, even if they don't have an associated object in the
#-# group's document?
# xwiki.authentication.group.allgroupimplicit=0

We use a XWiki.AllReadWriteGroup with XWiki.XWikiAllGroup as it’s only member.

We have

# xwiki.users.initialGroups=XWiki.XWikiAllGroup

too. Can we set

xwiki.authentication.group.allgroupimplicit=1

without any problems?

Documentation says too:

Then you should remove all the XObjects from the XWikiAllGroup page but you should keep the page since otherwise you won’t be able to set permissions for this group. This will prevent XWiki from having to load all that page’s XObjects representing the users (thousands of them if you have thousands of users).

I guess I need a script for that. I found: https://snippets.xwiki.org/xwiki/bin/view/Extension/Remove%20Objects/.

{{velocity}}
#if ($request.confirm == '1')
  #set ($targetDoc = $xwiki.getDocument('xwiki:XWiki.XWikiAllGroup'))
  #set ($result = $targetDoc.removeObjects('Page3.Page4.SomeClass'))
  #if ($result)
    #set ($discard = $targetDoc.save('Removed all xobjects'))
    XObjects removed!
  #else
    Error: XObjects not removed!
  #end
#else
  [[Remove XObjects>>||queryString='confirm=1']]
#end
{{velocity}}

What class should I fill in $targetDoc.removeObjects('Page3.Page4.SomeClass')? And will $xwiki.getDocument('xwiki:XWiki.XWikiAllGroup') work or do I have to set the wiki ‘xwiki’ in another way?

Simpel