GMail slows down
« previous entry | next entry »
Apr. 2nd, 2005 | 08:44 am
I was surprised to see the counter on GMail's front page still there. The quota really has been increased to 2050MB, as promised. The conter made me wonder how far they were going. Infinity+1?
Well, the quota count is managed by this chunk of code:
Cute, yes? It
Why it recalculates everything is beyond me and the for loop could be written for(i in CP) ... ahem, the point is that the counter is approaching certain values on a schedule. The times and sizes stored in CP are:
So, althought the quota is still increasing, it's doing so much slower than yesterday (4.2% of the previous rate).
Well, the quota count is managed by this chunk of code:
var CP = [
[ 1112331600000, 1025 ],
[ 1112439600000, 2050 ],
[ 1113062400000, 2075 ]
];
function updateQuota() {
if (!quota) {
return;
}
var now = (new Date()).getTime();
var i;
for (i = 0; i < CP.length; i++) {
if (now < CP[i][0]) {
break;
}
}
if (i == 0) {
setTimeout(updateQuota, 1000);
} else if (i == CP.length) {
quota.innerHTML = 'Over ' + CP[i - 1][1];
} else {
var ts = CP[i - 1][0];
var bs = CP[i - 1][1];
quota.innerHTML = format(((now-ts) / (CP[i][0]-ts) * (CP[i][1]-bs)) + bs);
setTimeout(updateQuota, 50);
}Cute, yes? It
- Finds where the current time is in the list (the for loop)
- Computes the difference in sizes (CP[i][1] - CP[i-1][1]) and time (CP[i][0] - CP[i-1][0])
- Calculates size/time to get how much it should add to the quotea
- Sets up a timer to call itself (to update the quota again)
Why it recalculates everything is beyond me and the for loop could be written for(i in CP) ... ahem, the point is that the counter is approaching certain values on a schedule. The times and sizes stored in CP are:
| time | target size |
|---|---|
| Fri Apr 01 2005 00:00:00 GMT-0500 (EST) | 1025 |
| Sat Apr 02 2005 06:00:00 GMT-0500 (EST) | 2050 |
| Sat Apr 09 2005 12:00:00 GMT-0400 (EDT) | 2075 |
So, althought the quota is still increasing, it's doing so much slower than yesterday (4.2% of the previous rate).
(no subject)
from:
sinclair_furie
date: Apr. 3rd, 2005 12:22 am (UTC)
Link
Reply | Thread
(no subject)
from:
turn_away__
date: Apr. 8th, 2005 12:12 pm (UTC)
Link
(came to your journal off
cheers :D
Reply | Parent | Thread
(no subject)
from:
edge_walker
date: Apr. 7th, 2005 04:07 pm (UTC)
Link
Nope, then i will also iterate over the array’s properties such as
length, rather than just the indices.Reply | Thread
(no subject)
from:
nikolasco
date: Apr. 7th, 2005 05:34 pm (UTC)
Link
By the way, how did you come across this?
Reply | Parent | Thread
(no subject)
from:
edge_walker
date: Apr. 7th, 2005 07:02 pm (UTC)
Link
Reply | Parent | Thread
(no subject)
from:
nikolasco
date: Apr. 7th, 2005 07:31 pm (UTC)
Link
Thanks.
Reply | Parent | Thread
(no subject)
from:
ceejayoz
date: Apr. 7th, 2005 09:33 pm (UTC)
Link
;-)
Reply | Thread
(no subject)
from:
ceejayoz
date: Apr. 8th, 2005 12:55 pm (UTC)
Link
Reply | Parent | Thread
(no subject)
from:
nikolasco
date: Apr. 8th, 2005 12:25 pm (UTC)
Link
Infinity is a hard thing to outpace. Maybe GMail could "outpace countable infinity" by increasing the quota by fractions1 (like the counter shows)
1the cardinality ("size") of real numbers is greater than that of integers
Reply | Parent | Thread
Reached 2075...
from: anonymous
date: Apr. 10th, 2005 11:42 am (UTC)
Link
Reply | Parent | Thread
Re: Reached 2075...
from:
nikolasco
date: Apr. 10th, 2005 12:04 pm (UTC)
Link
var CP = [[ 1112439600000, 2050 ],
[ 1113062400000, 2075 ],
[ 1113685200000, 2100 ]
];
The last element adds the deadline for 2100MB. It's scheduled for 4/16/2005 5pm. So, it seems they plan to add 25MB a week, at least for a while. They're also intentionally keeping the time periods fairly small.
The reason you "run out of schedule" is probably due to the times being local (they don't adjust for timezones).
Reply | Parent | Thread