Files
music_library/lib
Copilot e11894c095 Batch scrobble rule application by type to reduce N queries to 2 (#61)
* Implement optimized batch rule application

- Add apply_all_album_rules/1 to batch apply all album rules in single query
- Add apply_all_artist_rules/1 to batch apply all artist rules in single query
- Update apply_all_rules/0 to use new batch functions
- Add comprehensive tests for batch application
- Use CASE statement in SQL to apply multiple rules efficiently

Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com>

* Add batch application support for track-filtered rules

- Extend apply_all_album_rules/2 to support filtering by tracks
- Extend apply_all_artist_rules/2 to support filtering by tracks
- Update apply_all_rules/1 to use batch functions for track-filtered application
- Remove duplicate function definitions
- Ensures both main use cases (all tracks and specific tracks) are optimized

Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com>

* Add comprehensive documentation for optimization

- Document the problem and solution approach
- Explain SQL generation and performance impact
- Detail trade-offs and backward compatibility
- Include future considerations and scalability notes

Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com>

* Apply credo suggestions and format

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: cloud8421 <537608+cloud8421@users.noreply.github.com>
Co-authored-by: Claudio Ortolina <cloud8421@gmail.com>
2025-11-10 20:04:34 +00:00
..
2025-05-23 15:08:12 +01:00
2025-10-02 11:51:44 +03:00
2025-01-24 10:35:58 +00:00
2025-10-01 13:48:30 +03:00
2025-10-12 13:36:42 +02:00
2025-04-25 20:41:25 +01:00
2025-10-11 21:39:59 +02:00