powered by Jive Software

Optimizing 'get visible group names' from OfGroupProp

Hello,

We are using Openfire 3.7.1 with MySQL DB.

Currently in AbstractGroupProvider.java, getVisibleGroupNames() method is searching for a given group in a comma separated list of groupNames maintained for propName=‘sharedRoster.groupList’. In our application, we are using group names that are generated random UUIDs. Maintaining a comma separated list makes propValue of this particular propName a varible length string. That also means, a server with a large number of groups may not be able to take advantage of indexes in the MYSQL because use of LIKE operator does not use index.

For other group properties such as ‘sharedRoster.displayName’ and ‘sharedRoster.showInRoster’ can be designed as a fixed length strings and so they can leverage indexes.

Is it possible to have a separate table for maintaining this list of shared groups such as one having a primary key (groupname, sharedGroupname)?

With such a table, it will be easier to leverage indexes in MySQL. With this change, get visible group names query changes to:

“SELECT groupName from **ofSharedGroupList **” +

“where sharedGroupname=?”;

Please advise!

Thanks in advance!