Files
open-webui-custom/backend/open_webui/models
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-08 01:55:56 +04:00
2026-01-09 02:46:04 +04:00
2026-01-29 18:51:02 +04:00
2026-01-29 19:50:06 +04:00
2026-01-08 01:55:56 +04:00
2026-01-22 03:09:04 +04:00
2026-01-09 02:30:15 +04:00
2026-01-08 01:55:56 +04:00
2026-01-08 01:55:56 +04:00
2026-01-24 02:39:29 +04:00
2026-01-27 23:01:56 +04:00
2026-01-08 01:55:56 +04:00
2026-01-08 01:55:56 +04:00