Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions docs/BUILD_TIME_STUDY.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The rows overlap: they cannot be added.
- **`import webfront;`** (a module whose global module fragment includes `WebFront.hpp`) is not adopted. Tried again with
the light header: GCC 16.1 still ends with an internal compiler error (`stdexec/__detail/__query.hpp`), and Clang 22
precompiles a module whose import then fails to compile in stdexec (`no matching function for call` from
`__detail/__storage.hpp`). MSVC was not tried.
`__detail/__storage.hpp`). MSVC 19.52 fails the same way (section MSVC below).

## The light header (#766, ADR-029)

Expand All @@ -103,14 +103,34 @@ on 24 threads).
- The target of a secondary application unit under 5 s with GCC is met for a unit that calls JavaScript. A unit pays for
each signature it instantiates: eight registrations are at 5.4 s with optimisation.
- **`HelloWorld.cpp` does not get cheaper**: the difference above is within the noise. It instantiates the application,
which `Bridge.hpp` does not touch. The target of 30 % less on `HelloWorld.cpp` is **not met**, and no MSVC figure was
taken (no MSVC on the machine that made these measurements).
which `Bridge.hpp` does not touch. The target of 30 % less on `HelloWorld.cpp` is **not met**. The MSVC figures are in
the section below.
- Clang 22 `-ftime-trace` on `HelloWorld.cpp` (38 s): 17.5 s front end and 20.4 s back end. The largest instantiations,
which overlap, are `webfront::BasicWF` (12.5 s) and `webfront::http::Server` (8.5 s), then the senders of stdexec.
Reducing it means instantiating less of the server and the application, or compiling them once, which a header-only
core does not do (ADR-001).
- `<regex>` is no longer included anywhere under `include/`: nothing is left to rewrite by hand.

## MSVC (#766)

One Windows 11 machine (Intel Core i7-8700, 12 threads, 16 GB), MSVC 19.52, `-std:c++latest /EHsc /MT`, a direct `cl /c` of
each unit with the include paths of the CMake build, no compiler cache, three runs each, with the machine's usual background
load. Peak memory was not taken. Compare these figures with each other, not with the GCC ones or the runner figures above.

| What is compiled | `/O2 /DNDEBUG` | `/Od` |
| --- | --- | --- |
| `HelloWorld.cpp` | 29.5 to 29.9 s | |
| `HelloWorld.cpp`, `/Zs` (front end only) | 16.7 to 16.9 s | |
| A second unit that only calls `ui.jsFunction`, with `WebFront.hpp` | 18.7 to 19.2 s | 15.4 to 15.7 s |
| `test/unit/BridgeLightPage.cpp` (eight functions, two JavaScript calls), with `Bridge.hpp` | 4.2 to 4.3 s | 3.3 to 4.2 s |

- The unit with the light header, which does more than the heavy one, takes about a quarter of the time with optimisation
(GCC: 5.4 s against 17.8 s, a third). The front end is 57 % of `HelloWorld.cpp` on MSVC.
- **`import webfront;`** is not adopted with MSVC either: a module interface unit whose global module fragment includes
`WebFront.hpp` compiles in 14 s, and a unit that imports it and calls `ui.jsFunction` stops with
`C1116: unrecoverable error importing module 'webfront'` (specialization of `stdexec::connect_result_t` for `starts_on_t`
over `TaskScope::Joined`), the same class of failure as with Clang 22: the sender machinery of stdexec.

## Run time

The suite took 256 s (Linux) and 271 s (Windows). Its chain of dependent cases is `SelfBuildSession` -> `DeveloperFixtures`
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ these entries stays in the GitHub releases and the Git history.
- Window control under every embedded frontend (`app.windowControl()`): position, size, states, application and context menus with shortcuts, and a notification icon, with `unsupported` where the toolkit cannot; `WindowOptions::rememberAs` reopens a window where it was (#764, `docs/FRONTENDS.md`).
- Optional window service for the page (`webfront::services::Window`, `windowService()` of `@webfront/services`), answering the embedded view only (#764, ADR-020).
- A unit that only registers C++ functions or calls JavaScript can include the light `webfront/Bridge.hpp` and compiles in about a third of the time: pass it `webfront::bridgeFunctions(app)` or `webfront::bridgeUI(ui)` (#766, ADR-029).
- Measure the build of an application unit with MSVC and try `import webfront;` with it again: the light header makes a unit about four times cheaper, and the module is refused as with Clang (#766, `docs/BUILD_TIME_STUDY.md`).
- Bundle npm packages that use `#` subpath imports (the `imports` of their `package.json`, naming their own files or a dependency), such as Svelte 5, once an environment with it is published (#767).
- Start an interface without a UI library on a C++ state store with `wf create store`, once an environment with it is published (#767, `docs/STORE.md`).
- `@webfront/store` adapters for Vue and Lit are run in the browser suite, and the Svelte store contract with `svelte/store` 5 in a `wf test` case, with a per-library support policy (#767, ADR-010).
Expand Down
Loading