fix: move image_util_parse_metadata import to global scope#1114
fix: move image_util_parse_metadata import to global scope#1114moksha-hub wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
Fixes AOSSIE-Org#1108 Moved the image_util_parse_metadata import from inside loops to the top of the file (global scope). While Python caches module imports, importing inside tight loops is considered bad practice and adds unnecessary overhead when iterating over thousands of images. Changes: - Added import at line 10 with other app-specific imports - Removed redundant import inside db_get_all_images() loop (was line 179) - Removed redundant import inside db_get_untagged_images() loop (was line 245)
📝 WalkthroughWalkthroughMoved the import of Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@moksha-hub refer this message: #1115 (comment) |
Fixes #1108
Moved the image_util_parse_metadata import from inside loops to the top of the file (global scope). While Python caches module imports, importing inside tight loops is considered bad practice and adds unnecessary overhead when iterating over thousands of images.
Changes:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.