Skip to content

refactor: Keychainの実装を非同期化してパフォーマンスを改善#146

Merged
ensan-hcl merged 1 commit intomainfrom
feat/KeychainAsync
Jun 9, 2025
Merged

refactor: Keychainの実装を非同期化してパフォーマンスを改善#146
ensan-hcl merged 1 commit intomainfrom
feat/KeychainAsync

Conversation

@nyanko3141592
Copy link
Copy Markdown
Collaborator

  • KeychainHelperのメソッドをasync/awaitで非同期化

  • OpenAiApiKeyにキャッシュ機能を追加し、Keychainアクセスを最小化

  • アプリ起動時にKeychainから値を非同期で読み込む処理を追加

これにより、UIスレッドのブロックを防ぎ、アプリケーションの応答性が向上

- KeychainHelperのメソッドをasync/awaitで非同期化

- OpenAiApiKeyにキャッシュ機能を追加し、Keychainアクセスを最小化

- アプリ起動時にKeychainから値を非同期で読み込む処理を追加

これにより、UIスレッドのブロックを防ぎ、アプリケーションの応答性が向上
@ensan-hcl ensan-hcl self-requested a review June 4, 2025 14:30
Comment on lines +87 to +90
// Keychainから設定値を非同期で読み込み
Task {
await Config.OpenAiApiKey.loadFromKeychain()
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ、初回の利用時ってどういうことになる?キーチェーンに値が入っていない場合はアラート出ない?

Copy link
Copy Markdown
Member

@ensan-hcl ensan-hcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

神PR!

@ensan-hcl ensan-hcl merged commit 41a9d03 into main Jun 9, 2025
6 checks passed
@ensan-hcl ensan-hcl deleted the feat/KeychainAsync branch June 9, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants