Perf(custom): speed up software start up

ISSUES CLOSED: #489
This commit is contained in:
Kuingsmile
2026-04-29 17:26:04 +08:00
parent 39eda83a00
commit e99e68e6ce
2 changed files with 7 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ class RemoteNoticeHandler {
method: 'get', method: 'get',
url: REMOTE_NOTICE_URL, url: REMOTE_NOTICE_URL,
responseType: 'json', responseType: 'json',
timeout: 5000,
}).then(res => res.data)) as IRemoteNotice }).then(res => res.data)) as IRemoteNotice
return noticeInfo return noticeInfo
} catch { } catch {

View File

@@ -169,8 +169,12 @@ class LifeCycle {
notice.show() notice.show()
} }
} }
await remoteNoticeHandler.init() remoteNoticeHandler
.init()
.then(() => {
remoteNoticeHandler.triggerHook(IRemoteNoticeTriggerHook.APP_START) remoteNoticeHandler.triggerHook(IRemoteNoticeTriggerHook.APP_START)
})
.catch(() => {})
if (startMode === ISartMode.MINI && process.platform !== 'darwin') { if (startMode === ISartMode.MINI && process.platform !== 'darwin') {
windowManager.create(IWindowList.MINI_WINDOW) windowManager.create(IWindowList.MINI_WINDOW)
const miniWindow = windowManager.get(IWindowList.MINI_WINDOW) const miniWindow = windowManager.get(IWindowList.MINI_WINDOW)