Make 'Popular' page faster
Problem: The popular page is ungodly slow. Solution: Make it faster! This is done by checking the timestamp before the other constraints that we add to messages, which is mostly useful because most messages that fail the filter will fail on the timestamp check.
This commit is contained in:
parent
671c5f3fd3
commit
10fd740ef7
|
@ -685,11 +685,11 @@ module.exports = cooler => {
|
|||
source,
|
||||
pull.filter(msg => {
|
||||
return (
|
||||
msg.value.timestamp > earliest &&
|
||||
typeof msg.value.content === "object" &&
|
||||
typeof msg.value.content.vote === "object" &&
|
||||
typeof msg.value.content.vote.link === "string" &&
|
||||
typeof msg.value.content.vote.value === "number" &&
|
||||
msg.value.timestamp > earliest
|
||||
typeof msg.value.content.vote.value === "number"
|
||||
);
|
||||
}),
|
||||
pull.reduce(
|
||||
|
|
Loading…
Reference in New Issue