Files
open-webui-custom/backend/open_webui
Classic298 baef422a28 perf: eliminate redundant query after memory update (#21013)
## Summary
Eliminates redundant database query in update_memory_by_id_and_user_id. Previously, after modifying the memory object, it called get_memory_by_id which opened a new session and queried again.
## Changes
models/memories.py update_memory_by_id_and_user_id:
- Replace self.get_memory_by_id(id) with db.refresh(memory)
- Return the same memory object that was already modified
## Performance Impact
Before: 2 queries (get + get_memory_by_id)
After: 1 query + refresh on same session
2026-01-29 21:45:09 +04:00
..
2026-01-26 16:11:10 +04:00
2026-01-26 07:31:44 -05:00
2026-01-08 01:55:56 +04:00
2025-08-10 00:02:58 +04:00
2025-12-28 23:35:09 +04:00
2026-01-27 21:37:20 +04:00
2025-04-15 09:55:35 +02:00
2026-01-26 07:31:44 -05:00
2026-01-26 07:31:44 -05:00