Commit graph

9 commits

Author SHA1 Message Date
Timothy Jaeryang Baek
da661756fa refac/fix: proper notes db operations 2025-09-25 13:47:43 -05:00
Sihyeon Jang
6ae6cc9741 perf: optimize get_notes_by_user_id to reduce database queries
- Replace inefficient memory-based filtering with database-level filtering
- Add proper access control conditions to SQL query
- Reduce memory usage by filtering at database level instead of loading all notes
- Maintain access control validation with post-filtering for complex cases

This change significantly improves performance for users with many notes
by reducing the number of database queries and memory usage.

Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
2025-09-20 06:33:24 +09:00
Timothy Jaeryang Baek
c03ca7270e refac/feat: note/knowledge/chat select input menu 2025-09-14 09:54:06 +02:00
Sihyeon Jang
eff06538a6 perf: fix N+1 query issues in user group access control validation
- Pre-fetch user group IDs in get_*_by_user_id methods across models layer
- Pass user_group_ids to has_access to avoid repeated group queries
- Reduce query count from 1+N to 1+1 pattern for access control validation
- Apply consistent optimization across knowledge, models, notes, prompts, and tools

Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
2025-09-03 05:56:48 +09:00
Timothy Jaeryang Baek
3e01286b61 refac 2025-07-12 23:31:04 +04:00
Timothy Jaeryang Baek
9b8d6ed6d2 refac: notes 2025-07-12 00:16:57 +04:00
Timothy Jaeryang Baek
6820e41eb2 refac 2025-07-11 18:14:56 +04:00
Timothy Jaeryang Baek
47cd0770e4 refac 2025-07-11 17:54:38 +04:00
Timothy Jaeryang Baek
7fee84c06e feat: notes 2025-05-03 18:16:32 +04:00