Repository navigation
⚡ Refactor Canvas Crawler fetches to run concurrently - #103
google-labs-jules[bot] wants to merge 1 commit into
Conversation
Modified crawlCanvasCourse in extension/background/canvas-crawler.js (and its .cjs counterpart) to fetch course details and assignments concurrently using Promise.all() rather than sequentially awaiting them. This maintains identical error-handling behavior while drastically reducing I/O-bound wait time. Tested via local benchmark and automated suite.
|
👋 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. |
|
#109 rewrote Closing as part of triaging the open PRs against #109, which restructures the extension (it removes the |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
💡 What: Refactored
crawlCanvasCourseto fetch Canvas course details and assignment lists concurrently usingPromise.all(), replacing the previous sequentialawaits. Both the.jsand.cjsversions ofcanvas-crawlerwere updated to keep them in sync. Existing error handling semantics (e.g. throwing on course failure, catching on assignment failure) were preserved.🎯 Why: The previous implementation awaited the course data response, then its JSON payload, and then initiated the request for the assignments list. Because these requests do not depend on each other, this sequential execution was highly inefficient and increased latency unnecessarily. Running them in parallel reduces the overall network wait time significantly.
📊 Measured Improvement:
A dedicated test benchmark was implemented with mocked 50ms network delay per fetch and 10ms JSON parsing latency, looping over the function 20 times.
PR created automatically by Jules for task 13465145031442609993 started by @savvides