⚡ Bolt: Eliminate disk I/O in API endpoints#140
Conversation
Updated ResumeYAML and generators to accept resume_data directly, removing unnecessary temporary file creation and reading in API endpoints. This improves performance by ~53ms per request and reduces disk I/O. Co-authored-by: anchapin <6326294+anchapin@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:
Refactored
ResumeYAML,TemplateGenerator,ATSGenerator, andCoverLetterGeneratorto accept an optionalresume_datadictionary in their constructors.Updated
api/main.pyendpoints (render_pdf,ats_check,generate_cover_letter) to pass the request data directly to these generators instead of writing it to a temporaryresume.yamlfile.🎯 Why:
The API was previously writing the request payload to a temporary file on disk, then initializing generators which read that file back into memory. This introduced unnecessary disk I/O latency and file system operations for every request.
📊 Impact:
Microscope Measurement:
benchmark_io.py(which was created during development) to see the difference.pytest tests/test_api_optimization.pyverified that generators are initialized with the correct data.PR created automatically by Jules for task 6750124313435768186 started by @anchapin