[PR #692] [MERGED] perf(web, lib): do not await inside promise statements #1122

Closed
opened 2026-02-26 19:31:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/692
Author: @snax4a
Created: 11/28/2023
Status: Merged
Merged: 11/28/2023
Merged by: @Mythie

Base: mainHead: main


📝 Commits (1)

  • 657fe0a perf(web, lib): do not await inside promise statements

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/page.tsx (+2 -2)
📝 packages/lib/server-only/user/get-all-users.ts (+2 -2)

📄 Description

  • removes await keyword from promises passed to Promise.all

Using await inside a Promise.all will make the awaited Promise resolve first, and only after that the Promise.all will be called. This means the promises are run serially. In these two cases, we probably don't want that


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/692 **Author:** [@snax4a](https://github.com/snax4a) **Created:** 11/28/2023 **Status:** ✅ Merged **Merged:** 11/28/2023 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`657fe0a`](https://github.com/documenso/documenso/commit/657fe0a3aa8a485ef68a6923f2fe9bc1a26549f2) perf(web, lib): do not await inside promise statements ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/page.tsx` (+2 -2) 📝 `packages/lib/server-only/user/get-all-users.ts` (+2 -2) </details> ### 📄 Description - removes `await` keyword from promises passed to `Promise.all` Using `await` inside a `Promise.all` will make the awaited Promise resolve first, and only after that the Promise.all will be called. This means the promises are run serially. In these two cases, we probably don't want that --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:31:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1122
No description provided.