Repository navigation
⚡ Optimize repeated config loading - #15
Conversation
- Implement `_read_config_file` with `lru_cache` to avoid repeated IO/parsing. - Use `copy.deepcopy` to ensure returned `Config` objects are safe to mutate. - Update `save_config_to_file` to invalidate cache. - Add test case for caching behavior. Co-authored-by: niklashoelter <83964137+niklashoelter@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What:
Optimized
load_config_from_fileinsrc/gpuma/config.pyby caching the raw dictionary loaded from the configuration file.🎯 Why:
The configuration file was being re-read and re-parsed on every call to API functions like
optimize_single_smiles, leading to unnecessary I/O and overhead (approx 0.05ms per call for small files, potentially much more for YAML or larger files).📊 Measured Improvement:
Configobject by consumers do not pollute the cache.PR created automatically by Jules for task 14101587807776317242 started by @niklashoelter