Jump to content
Banner by ~ Ice Princess Silky

Same friends/followers displayed on profile page


DubWolf

Recommended Posts

This isn't much of a concern, but I'm just wondering why it's always the same followers that are displayed on one's profile page upon entering it, and if there's some sort of algorithm behind why those particular users were chosen (it's not alphabetical or join date) :huh: .

  • Brohoof 2
Link to comment
Share on other sites

I've never paid attention to that, but now I'm curious as well, good question. :ooh:

 

In IPB3 it was (or at least was supposed to) picking friends randomly, each time the page was loaded. It seems, that after the upgrade it's now stuck - perhaps glitched? :huh:

 

15 hours ago, Trixie . said:

I think it is just based on the date of following or something completely random.

The date of following may be the case. If that's actually it, then it would be displaying the first followers ever.

I actually have checked that theory and I was going to say, that it's not true, but then I reminded myself, that there was that forum upgrade, where the friend list got replaced by followers. That update could reinitialize the order, though I really have no idea, because there are no dates displayed, so I don't have anything, that would support that theory, so I can only suspect things. New members could test that though, but let's not be ridiculous. :P:D 

 

Nevertheless, it would be pretty silly if that would be working that way. I believe it should be displaying random followers each time the page is loaded. My guess is, that it's currently bugged. :rarity: 

 

Well, tech pones to the rescue, I guess. ^_^ 

  • Brohoof 1
Link to comment
Share on other sites

Since the upgrade I've had a few people follow me so the profile page follow lists isn't ordered by most recent followers first. As Riki pointed out, if the install date of the new forum is the first decision piece in the algorithm, then all friends may have been converted to the same date. At which point it could be randomized but set to display the same order after initially being randomized.

The order is something that IPS would have considered, even if it was decided to have it ordered randomly. Still, like the OP points out the profile list's behavior doesn't appear like a random array function is the only thing in play. 

Link to comment
Share on other sites

At the moment I can't verify this as I don't have direct access to the dbs, however I can give an educated guess as I am a db engineer in RL. :)

If not provided with a sort order in the query that pulls the data from the database, the query will use whatever indexes are on the database table by default simply because that's the way the data is 'physically' sorted in the database (I won't get into the differences between clustered and non-clustered indexes here, let's just assume for the moment we're dealing with clustered indexes just to make it easier. ;) ) If the individual table doesn't have an index, the indexes of any joined tables will do.

So... basically I don't think the UI has an order in the query that pulls that follower list. I think it's defaulting to some table's index. Possibly the User table itself, in which case the order isn't the date they followed you, it's the date they *joined* the forums.

As for pulling a random sample... that's a real pain to pull off. The standard solution for MySQL databases (which is what this forum runs on) is really process heavy as it has to assign a random number to every possible row *first* and then sort and limit it. There are other database engines which have a built-in random sample function (TABLESAMPLE), but I don't believe ours is one of them.

  • Brohoof 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...