mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 16:05:43 +00:00
perf(deploy-to-hub): parallelize public-app URL resolution
resolvePublicUrl now runs once per anonymous app via Promise.all instead of serially inside the items loop, removing N round-trips from initial tab load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
2dec554abf
commit
66bb08940c
@@ -186,6 +186,11 @@
|
||||
workspaceRateLimit = settings?.public_app_execution_limit_per_minute
|
||||
|
||||
const next: DeployItem[] = []
|
||||
const publicApps = apps.filter((a) => a.execution_mode === 'anonymous')
|
||||
const publicUrls = await Promise.all(
|
||||
publicApps.map((a) => resolvePublicUrl(workspace, a.path))
|
||||
)
|
||||
const publicUrlByPath = new Map(publicApps.map((a, i) => [a.path, publicUrls[i]]))
|
||||
for (const a of apps) {
|
||||
const isPublic = a.execution_mode === 'anonymous'
|
||||
next.push({
|
||||
@@ -195,7 +200,7 @@
|
||||
summary: a.summary,
|
||||
rec: 'none',
|
||||
published: isPublic,
|
||||
publicUrl: isPublic ? await resolvePublicUrl(workspace, a.path) : undefined
|
||||
publicUrl: isPublic ? publicUrlByPath.get(a.path) : undefined
|
||||
})
|
||||
}
|
||||
for (const a of rawApps) {
|
||||
|
||||
Reference in New Issue
Block a user