Skip to content

Commit

Permalink
CLDR-17249 be perf - run forum stuff in separate thread
Browse files Browse the repository at this point in the history
- split out doForumAfterVote() to a separate thread
  • Loading branch information
srl295 committed Jan 9, 2024
1 parent b715cb7 commit 1124e5d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/cldr-apps/src/main/java/org/unicode/cldr/web/STFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,17 @@ private void saveVoteToDb(
// excluded.
if (sm.fora != null
&& (voteType != VoteType.AUTO_IMPORT && voteType != VoteType.MANUAL_IMPORT)) {
sm.fora.doForumAfterVote(
locale, user, distinguishingXpath, xpathId, value, didClearFlag);
final boolean clearFlag = didClearFlag;
SurveyThreadManager.getExecutorService()
.submit(
() ->
sm.fora.doForumAfterVote(
locale,
user,
distinguishingXpath,
xpathId,
value,
clearFlag));
}
}

Expand Down

0 comments on commit 1124e5d

Please sign in to comment.