diff --git a/Cargo.toml b/Cargo.toml index aca25ea..a28a009 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -292,17 +292,28 @@ getrandom = { version = "0.4" } # >>> FerroUI profiles (written by FerroUI/scripts/apps/sync-workspace.py from FerroUI/Cargo.toml; do not edit) # The default release build is the one that is built most often, so it is set up for build time: # thin LTO over the default sixteen code generation units, which generates code on all cores. +# It aborts on panic, as `dist` does (#567, docs/binary-size.md, section 4.7): no framework path +# relies on catching a panic, and unwinding tables and landing pads are a fifth of an executable. [profile.release] lto = "thin" +panic = "abort" + +# `release` with unwinding, for a program that catches panics to carry on (a plug-in host, a tool +# that isolates the code it runs). Tests and benchmarks unwind in every profile. +[profile.release-unwind] +inherits = "release" +panic = "unwind" # Optimised code for running an application locally (`cargo run --profile fast-release -p `): # the optimisation level of release, without link-time optimisation across crates. The last step # of an executable then links the optimised crates instead of optimising the whole program again, # which took most of a release build of a large application. Not for measurements or shipping: -# the benchmarks are measured with release, and what is shipped is built with dist. +# the benchmarks are measured with release, and what is shipped is built with dist. It unwinds: +# the Designer and the previewer, run this way, isolate the code of the previewed application. [profile.fast-release] inherits = "release" lto = false +panic = "unwind" # The build that is shipped and measured (`cargo build --profile dist`, `scripts/perf-report.py # --profile dist`): whole-program optimisation in one code generation unit. The executables are @@ -338,6 +349,24 @@ panic = "abort" inherits = "dist" panic = "unwind" +# Compiled theme markup runs once, when a theme is constructed, and is a large share of an +# executable: the theme crates are optimised for size in the shipped build (#581). Their start-up +# cost is within noise (docs/binary-size.md, section 4.14). +[profile.dist.package.ferroui-themes-winui] +opt-level = "z" + +[profile.dist.package.ferroui-themes-fluent] +opt-level = "z" + +[profile.dist.package.ferroui-themes-simple] +opt-level = "z" + +[profile.dist.package.ferroui-themes-macos] +opt-level = "z" + +[profile.dist.package.ferroui-themes-material] +opt-level = "z" + # The WebAssembly module of the browser (scripts/build-browser.sh): optimised for size, because the # module is downloaded and compiled by every visitor (docs/porting/browser-platform.md, section 18). # The crates of the run-time XAML loader stay optimised for speed: at "z" the start-up of a themed diff --git a/Ember.Browser/tests/browser-smoke.mjs b/Ember.Browser/tests/browser-smoke.mjs index a4a76be..152f1ac 100644 --- a/Ember.Browser/tests/browser-smoke.mjs +++ b/Ember.Browser/tests/browser-smoke.mjs @@ -50,7 +50,13 @@ async function waitText(page, text) { await page.waitFor(`globalThis.ember?.emberState && JSON.parse(ember.emberState())?.elements.some(e => e.text === ${JSON.stringify(text)})`, 30000); } async function click(page, predicate, description) { - const element = (await state(page)).elements.find(element => element.hit && predicate(element)); + // A control that appears with a change (the dismiss button of a new status) becomes a hit target + // after the next layout and frame, which a slower runner may not have reached yet: wait for it. + let element; + for (const end = Date.now() + 5000; ; await sleep(100)) { + element = (await state(page)).elements.find(element => element.hit && predicate(element)); + if (element || Date.now() > end) break; + } assert(element, `No visible hit target: ${description}`); await page.click(element.x + element.width / 2, element.y + element.height / 2); await sleep(250); diff --git a/FerroUI b/FerroUI index 0c0ea2a..d2da3a6 160000 --- a/FerroUI +++ b/FerroUI @@ -1 +1 @@ -Subproject commit 0c0ea2a72f1a3fce5693991efb79631dae5e6603 +Subproject commit d2da3a6151140e2356b13612995d1f51ab6d4c06