Is there an existing issue for this?
What happened?
Where : backend/app/database/images.py
What happened ? : from app.utils.images import image_util_parse_metadata is called inside the for loop within db_get_all_images.
What should be : Move from app.utils.images import image_util_parse_metadata to the top of the file (global scope).
Why?: Importing a module inside a tight loop executing thousands of times adds unnecessary overhead (though Python caches it, it's bad practice).
Record
Is there an existing issue for this?
What happened?
Where :
backend/app/database/images.pyWhat happened ? : from
app.utils.imagesimportimage_util_parse_metadatais called inside the for loop withindb_get_all_images.What should be : Move from
app.utils.imagesimportimage_util_parse_metadatato the top of the file (global scope).Why?: Importing a module inside a tight loop executing thousands of times adds unnecessary overhead (though Python caches it, it's bad practice).
Record