diff --git a/backend/app/app.go b/backend/app/app.go index d85608d..445c7de 100644 --- a/backend/app/app.go +++ b/backend/app/app.go @@ -162,7 +162,8 @@ func (app *Application) GetMaxProcs() int { return runtime.GOMAXPROCS(0) } -// Num is clamped between 1 and NumCPU*2 as any further is unnecessary and may cause overhead. +// Sets GOMAXPROCS to given value and ensures it is clamped between 1 and NumCPU*2 as any further may degrade performance due to context switching. +// Note that blocking syscalls can have their own threads regardless of the limit set here. func SetMaxProcs(num uint8) int { return runtime.GOMAXPROCS(lo.Clamp(int(num), 1, runtime.NumCPU()*2)) } diff --git a/frontend/bun.lockb b/frontend/bun.lockb index a8cc3c4..a208aa2 100644 Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ diff --git a/frontend/src/App.vue b/frontend/src/App.vue index dcea524..e268557 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -15,10 +15,7 @@ import { import { useAppStore } from '@stores' import { getOpenDialogs } from '@composables' -const appStore = useAppStore() -const { - setMaxThreads -} = appStore +const { setMaxThreads } = useAppStore() //const settingsDialog = useDialog('settings') diff --git a/frontend/src/components/general/Sidebar.vue b/frontend/src/components/general/Sidebar.vue index fb67128..3b20a06 100644 --- a/frontend/src/components/general/Sidebar.vue +++ b/frontend/src/components/general/Sidebar.vue @@ -1,28 +1,33 @@