Skip to content

Commit

Permalink
re-add parallel syncing to optimize performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Debian committed Dec 12, 2023
1 parent 9ad6b9f commit 88633a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/ts/containers/mapDispatchToProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ let totalSyncedComments = 0;
const syncComments = async (commentQueue: any[], dispatch: Redux.Dispatch<Redux.Action>, commentType: String) => {
// We need to throttle the amount of parallel sync requests that we make
// because large forums could be syncing thousands of comments
// Parent comments can be synced in parallel but child comments need to be synced 1 at a time
const maxParallelRequests = commentType === 'parentComments' ? 100 : 1;
const maxParallelRequests = 100;
const parallelRequests: Promise <void> [] = [];
for (let comment of commentQueue) {
// Make the sync request and add its promise to the queue,
Expand Down

0 comments on commit 88633a7

Please sign in to comment.