Undefined
Undefined

Reputation: 1929

Optimising a user interest ranking algorithm

On my site there is currently an algorithm ranking content by points/age. We want to introduce user specific ranking based on a users preference. So for example something like: points/age*userPreference The only problem is currently to reduce server load we are caching the ranks in the database because calculating the rank for every piece of content on page load would take too long. Now we want user specific ranking this would no longer work because the rank would be different for each user. How could we go about implementing this without having to recalculate the rank of all the content each page load?

Upvotes: 1

Views: 292

Answers (1)

Basic
Basic

Reputation: 26766

You need to come up with a set of "Standard" users - eg pick 10 different ages, both genders, and whatever other preferences may be relevant... then calculate the scores for each of them,

You'd then match a user to the closest "Standard" user based on their personal details.

This is effectively the old time/space trade-off. You can take it further by making your standard users list long enough to encompass every possibility but this would likely be huge

Upvotes: 1

Related Questions