Repository navigation
perf(demo): installed browser, one browser process, early OpenCV load (carry-over of openadapt-flow#528) - #1189
Merged
Merged
Conversation
The demo now launches the installed Chrome or Edge through Playwright's channel option. Without one, it downloads only Chromium's headless shell instead of the full browser. A channel browser that fails to start falls back to Playwright's own build. OPENADAPT_FLOW_BROWSER selects auto, chrome, msedge, or bundled. The tutorial's record run and both replays share one browser process. Each run still gets a fresh browser context. The OCR models load on a background thread while the browser starts. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
On a fresh macOS install the first OpenCV import takes 9 to 13 seconds while the system verifies its native libraries. The demo now starts that load on a background thread before it starts the browser. The browser process code moves to a module that does not import OpenCV. The demo prints one line per stage as it starts, instead of staying silent until both runs end. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
The demo's summary stays at most eight lines. Stage progress now rewrites a single line on a terminal and prints nothing when output is piped. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
replay, resume, bench, record, the attended service, and generated MCP tools still launched Playwright's own Chromium, while PlaywrightBackend picked the installed Chrome. A project pinned under one browser then replayed under the other, so the qualification environment check halted the Desktop check-it practice run. All of these paths now go through launch_chromium. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
The attended service now picks and prepares the browser through launch_chromium, which runs after Playwright starts. The test still checks that every step runs on the owner thread. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carry-over of OpenAdaptAI/openadapt-flow#528 (
perf/fast-first-run, head7159f8c5).Replayed with
git format-patch --no-merges origin/main..7159f8c5(6 commits; the merge of origin/main into the branch is skipped because main is already in the monorepo) andgit am -3 --directory=packages/flowontomain. Applied cleanly.