mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Small performance improvement
This commit is contained in:
parent
1d97cf17ed
commit
bd6812d92d
1 changed files with 7 additions and 7 deletions
|
|
@ -123,15 +123,15 @@ export const getComments = async (callback, threadID, maxComments, after = 0, be
|
|||
let chunks = Math.floor(maxComments / chunkSize), firstChunk = true, response, lastCreatedUtc = 1
|
||||
while (true) {
|
||||
|
||||
let query = commentURLbyLink + threadID
|
||||
if (!inBrokenRange(after))
|
||||
query += '&q=*'
|
||||
if (after)
|
||||
query += `&after=${after}`
|
||||
if (before)
|
||||
query += `&before=${before}`
|
||||
let delay = 0
|
||||
while (true) {
|
||||
let query = commentURLbyLink + threadID
|
||||
if (!inBrokenRange(after))
|
||||
query += '&q=*'
|
||||
if (after)
|
||||
query += `&after=${after}`
|
||||
if (before)
|
||||
query += `&before=${before}`
|
||||
await pushshiftTokenBucket.waitForToken()
|
||||
try {
|
||||
response = await fetchJson(query)
|
||||
|
|
|
|||
Loading…
Reference in a new issue