Throw a debounce back in for performance

A scroll-event-based function every tenth of a second is better
than whatever arbitrary timer scroll events can have.
This commit is contained in:
Zixaphir 2014-01-06 09:42:15 -07:00
parent a7ce01cb61
commit f782b0d3c0
3 changed files with 5 additions and 5 deletions

View File

@ -9694,7 +9694,7 @@
}
return arr.splice(0, i);
},
read: function(e) {
read: $.debounce(100, function(e) {
var ID, height, post, posts;
if (d.hidden || !Unread.posts.length) {
return;
@ -9722,7 +9722,7 @@
if (e) {
return Unread.update();
}
},
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {
return;

View File

@ -9677,7 +9677,7 @@
}
return arr.splice(0, i);
},
read: function(e) {
read: $.debounce(100, function(e) {
var ID, height, post, posts;
if (d.hidden || !Unread.posts.length) {
return;
@ -9705,7 +9705,7 @@
if (e) {
return Unread.update();
}
},
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {
return;

View File

@ -135,7 +135,7 @@ Unread =
break if post.ID > Unread.lastReadPost
arr.splice 0, i
read: (e) ->
read: $.debounce 100, (e) ->
return if d.hidden or !Unread.posts.length
height = doc.clientHeight