Let's do some maths. By "not very long" - how many milliseconds do you envisage this taking per user?
https://stackoverflow.com/users - this shows me 10050 pages, so about 350k users.
page 3000 - avg points 25
page 2000 - avg points 64
page 1000 - avg points 250
page 500 - avg points 698
Even at page 5000 on (or earlier) where a user has only 1 rep, they could have had an approved suggested edit + downvoted answer. If the downvoted answer was deleted, then you need to give them back 2 points.
Assuming only 2 timings:
- 1ms for <=10 rep, e.g. page 5000+ => 170k users (approx)
- 2ms for normal users, even up to Jon Skeet => 170k users (approx)
That would take a total of 3x 170k = 142 => 8.5 minutes. 2ms is not too far fetched, given that only about 200 users get within 10% of Jon Skeet's rep, and it can't take 20ms to produce JS's
So all in all, 8.5 minutes per day? I say let's vote this up!
The query below which fully calculated daily capped points based on a modified version of http://data.stackexchange.com/stackoverflow/qe/1035/fastest-to-20k takes less than 20 seconds to complete.
if object_id('tempdb..#t') is not null drop table #t
create table #t (
total as isnull(immune,0) + isnull(votes_capped,0),
primary key clustered(owneruserid, rn))
rn=row_number() over (partition by owneruserid order by creationdate),
(select min(a) from (
select sum(rep) a
select 200) x) as votes_capped
when 1 then 15
when 8 then -bountyamount
when 9 then bountyamount
when 2 then 10
when 3 then -2
from votes v
inner join posts p on p.id = v.postid
inner join users u on u.id = p.owneruserid
where v.votetypeid in (1,2,3,8,9)
and p.communityowneddate is null
select p2.owneruserid, v.creationdate, null, null, 2
from votes v
inner join posts p1 on p1.id = v.postid
and v.votetypeid = 1 -- question accepted by asker
inner join posts p2 on p2.id = p1.parentid
inner join users u on u.id = p2.owneruserid
where p2.communityowneddate is null
group by owneruserid, creationdate