Skip to content

Performance: /toggle-favourite loads all images instead of single image #977

@harsh1519

Description

@harsh1519

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The /toggle-favourite endpoint fetches the entire images table using db_get_all_images() to determine the favourite status of a single image. This causes O(n) complexity and unnecessary memory usage.

Record

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions