S052: log effective engine tuning values at start, DNS prefetch on
This commit is contained in:
parent
340c034be5
commit
ec050ca9ab
2 changed files with 11 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ hidden views — the old "limited" setting row comes back); RAM of Nacre measure
|
|||
- D-032, D-040; `docs/engine/tune/` (base and mem500/no-page-cache rows); `tools/engine-test/run.sh` header, `sample.py` header; `src/app.rs` `rest_background_tabs`.
|
||||
|
||||
## Steps
|
||||
- [ ] Defaults: page cache off, memory pressure 500 MB, cache model DocumentViewer, HW policy default; `NACRE_WK_*` overrides; log the effective values at start.
|
||||
- [x] Defaults: page cache off, memory pressure 500 MB, cache model DocumentViewer, HW policy default; `NACRE_WK_*` overrides; log the effective values at start.
|
||||
- [ ] Background tabs: hidden views frozen/suspended after the setting's delay (check the WebKitGTK 2.54 API: `WebView` visibility already throttles; web process suspension if available); settings texts updated.
|
||||
- [ ] Measure: Nacre hidden with the tune site list (`tools/engine-test/tune-sites.txt`, 10 tabs, idle phase) with `sample.py`; compare to the tune "mem500/no-page-cache" rows; write the row and the comparison (software GL caveat for VRAM).
|
||||
- [ ] Slow-connection pass (user, 2026-11-13: "everything is slow with my internet … someone with my internet should be able to use the browser smoothly"; reloads and revisits felt uncached): with a throttled local server (e.g. `tc netem` on a veth/loopback test namespace or a server that paces bytes; never a proxy), measure first visit, revisit, reload and back/forward for the default cache model and page cache on/off; make sure revisits come from the HTTP disk cache (S050 moved the default to DocumentBrowser), DNS prefetch and preconnect are on, and back/forward doesn't refetch if the RAM cost of the page cache is acceptable (record the trade-off and pick; amend D-040). Times in PROGRESS.
|
||||
|
|
|
|||
|
|
@ -162,9 +162,11 @@ impl Engine {
|
|||
// DocumentViewer has no HTTP disk cache (D-040).
|
||||
_ => webkit::CacheModel::DocumentBrowser,
|
||||
});
|
||||
let page_cache = env("NACRE_WK_PAGE_CACHE").as_deref() == Some("1");
|
||||
let settings = webkit::Settings::new();
|
||||
settings.set_enable_developer_extras(setup.developer_extras || env("NACRE_WK_INSPECTOR").is_some());
|
||||
settings.set_enable_page_cache(env("NACRE_WK_PAGE_CACHE").as_deref() == Some("1"));
|
||||
settings.set_enable_page_cache(page_cache);
|
||||
settings.set_enable_dns_prefetching(true);
|
||||
settings.set_javascript_can_open_windows_automatically(true);
|
||||
settings.set_enable_back_forward_navigation_gestures(true);
|
||||
// Camera and microphone (getUserMedia) and calls; each use still asks (`permission-request`).
|
||||
|
|
@ -175,6 +177,13 @@ impl Engine {
|
|||
Some("always") => settings.set_hardware_acceleration_policy(webkit::HardwareAccelerationPolicy::Always),
|
||||
_ => {},
|
||||
}
|
||||
eprintln!(
|
||||
"engine tuning: page cache {}, memory limit {} MB, cache model {:?}, hardware acceleration {:?}",
|
||||
if page_cache { "on" } else { "off" },
|
||||
mem_limit,
|
||||
context.cache_model(),
|
||||
settings.hardware_acceleration_policy()
|
||||
);
|
||||
if !setup.user_agent.trim().is_empty() {
|
||||
settings.set_user_agent(Some(setup.user_agent.trim()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue