Reduce PubSub Memory Consumption


i have a setup with hundred of thousands pubsub nodes of which only a couple of thousands are in use at any point in time.

I created a jmap histogram of the live system and saw that Openfire holds the entire pubsub structure (nodes, subscriptions, affiliations)

in memory all the time. As this requires a quite large amount of memory i was thinking that it might make sense to persists nodes to

the DB after a certain time of inactivity (no subscribe or publish) and reload them to memory when needed. At least in my case this

would help me scale the system much further on existing hardware and reduce the time needed for an Openfire restart.

I would be willing to implement this but before i start i want to ask for feedback. I anyone else interested in this feature or

already working on it? Are there any objections against it?