powered by Jive Software

EntriesAdded, Updated, Deleted


I noticed that in Smack 2.1.0 the rosterModified listener was split into the there methods in the subject. While the idea is great, I think you flunked it by passing a collection of user names, when passing the roster entries would have been much better.

The rationale is that you already have the roster entry for free when building said collections, but the handler receives only the name, so it has to look up the entry with Roster.getEntry(String), which runs in O(N), thus increasing each method’'s run time from O(M) to O(M*N), where M is the number of entries in the collection and N the number of entries in the roster. This is particularly significant when logging in, as you receive the full roster, thus the run time becomes O(N^2).

I suggest you change the interface to pass RosterEntry’'s, but I understand it could be hard now.