Repository navigation
perf: backport stability and performance fixes from upstream - #13
Merged
Merged
Conversation
The renderer size already includes the scaling factor, so using the same factor as the renderer scale shrank the image twice when the orientation was fixed (e.g. mjpegFixOrientation with mjpegScalingFactor=50 produced 25% frames). Keep the source image scale instead. Backport of appium#1278. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fb_waitUntilStableWithTimeout temporarily overrides waitForIdleTimeout and forces the quiescence wait on. If the wait raised an exception, both overrides leaked into all following commands. Restore them in @finally. Backport of appium#1281. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Neighbour nodes referenced each other strongly, so the element cache of every session leaked all of its cached elements. Make the backward link weak and detach removed nodes. Backport of appium#1274. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The system application accessibility element was requested over XPC on every alert check, active application fallback and session deletion. Its identity cannot change while WDA is alive, so resolve it once. Backport of appium#1232. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Each activeApplication call queries the application state, so do not resolve it separately for the start and end coordinates. Backport of appium#1197. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The serializer already knows the position of each child, but the index attribute scanned all siblings to find it, and every dimension attribute recalculated the element rect. Pass the index down and calculate the rect once per element. The page source stays byte-identical. On a page with 1000 sibling buttons /source went from ~4.3s to ~4.0s on the simulator. Backport of appium#1283. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
FBTestmanagerdVersion spun the main run loop until testmanagerd replied, without any timeout. All commands are served from the main thread, so a daemon that never replied hung the whole server on the first /status. Wait up to 20 seconds and assume the newest protocol otherwise, like upstream does. Only legacy testmanagerd versions that support the protocol version exchange take this path; modern ones are not affected. Based on appium#1228. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Summary
Small fixes ported from appium/WebDriverAgent that apply to this fork without changing the existing behavior. One commit per item.
mjpegFixOrientationthe scaling factor was applied twice (50% produced 25% frames)waitForIdleTimeoutoverridden and the quiescence wait forced on for all following commands/statuscould hang the main thread forever if a legacy testmanagerd never repliedNotes
/statusruns on the main thread here. This path is only taken by legacy testmanagerd versions; on Xcode 26 it is not reached, so it is verified by build and review only./sourcewent from ~4.3s to ~4.0s; on regular screens the time is dominated by the snapshot request.Testing
/status.