Commit Graph
12260 Commits
Author SHA1 Message Date
Muki Kiboigo 60a7ecc71f preload scripts should also be muted 2026-11-20 06:44:53 -08:00
Muki Kiboigo df18a2b32d TEMP: use zig-v8-fork with IsOpaque 2026-11-20 06:37:50 -08:00
Muki Kiboigo 62062e0780 use v8 IsOpaque for scripts 2026-11-20 06:37:37 -08:00
Muki Kiboigo 651eeb23ec muted error tests 2026-11-20 05:48:26 -08:00
Muki Kiboigo 8ca1181869 cross-origin scripts must be muted 2026-11-20 05:48:01 -08:00
Karl Seguin 786d715f8e Merge pull request #4694 from lightpanda-io/github-translate-c
build: fetch translate-c and aro from GitHub mirrors
2026-11-18 19:13:26 +08:00
Adrià Arrufat bb58f0ae13 build: fetch translate-c and aro from GitHub mirrors
Codeberg outages fail the build at dependency fetch. Point translate_c at
lightpanda-io/translate-c, and declare aro at the root so the Codeberg
URLs in v8 and translate_c are never used: dependencies are deduplicated
by hash and the root manifest is resolved first. Hashes are unchanged.
2026-11-18 10:28:01 +01:00
Karl Seguin 166f503a7b Merge pull request #4688 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-11-18 10:08:20 +08:00
github-actions[bot] 30bde2c6dd orderfile: regenerate the hot-code profile
hot set 16492KB resident at 4KB fault-around: 21851 text, 24349 rodata symbols
2026-11-18 01:55:15 +00:00
Karl Seguin e02c3f83f9 Merge pull request #4687 from lightpanda-io/chrome-tests
adjust tests for newest chrome release
2026-11-18 09:29:28 +08:00
Karl Seguin f81d3ac8d5 revert the chrome change
This was based on chrome running with different settings:
https://github.com/lightpanda-io/demo/pull/317
2026-11-18 09:10:14 +08:00
Karl Seguin 0faee800de Merge pull request #4677 from lightpanda-io/mcp-reap-default-session
mcp: close the idle default session's pages
2026-11-18 08:53:13 +08:00
Karl Seguin f2dc8ceeb4 adjust tests for newest chrome release 2026-11-18 08:48:42 +08:00
Karl Seguin 0e1d8d01ff Merge pull request #4676 from gmit3/fix/349-infallible-nodelist-access
collections: return NodeList length and getAtIndex without an error union
2026-11-18 08:45:41 +08:00
Karl Seguin 2e311f196c Merge pull request #4675 from gmit3/fix/349-identity-lookup-before-type-walk
js: look up a returned object's identity before walking its type chain
2026-11-18 08:45:22 +08:00
Karl Seguin b62323225c remove unneeded error union return from more types 2026-11-18 08:04:25 +08:00
Karl Seguin a1b4f14af1 add more comptime checks 2026-11-18 07:49:29 +08:00
Karl Seguin b4d0a529a5 Merge pull request #4673 from lightpanda-io/grider-layout
Grider Layout
2026-11-18 07:12:57 +08:00
Karl Seguin f160d38c26 Merge pull request #4661 from lightpanda-io/v8-initial-heap
perf: Adds a new flag, --v8-gc-floor-mb and change the default
2026-11-18 07:12:39 +08:00
Karl Seguin b0b248bf36 Merge pull request #4670 from lightpanda-io/crash-resume-aborted-transfer
crash: fix a crash on RI to an aborted transfer
2026-11-18 07:12:20 +08:00
Adrià Arrufat 16e4b567f9 mcp: trim comments 2026-11-17 15:49:57 +01:00
Adrià Arrufat 65b590fec8 mcp: drop the timeout alias and a redundant test step 2026-11-17 15:44:47 +01:00
Adrià Arrufat 9c49272a25 mcp: close the idle default session's pages
The default HTTP session is exempt from --http-session-timeout, and its
page keeps being pumped while idle. A script-heavy page left there holds a
core for as long as the process runs.

When the default session has been idle for the timeout, close its pages
and trim. The session stays, with its cookies: reaping it would have a
fresh one overwrite the --cookie-jar file on exit.

HttpServer.init takes the timeout as a parameter, since the default
worker now reads it from its first iteration.
2026-11-17 15:13:52 +01:00
Goran Mitrovic 1b711d480b collections: return NodeList length and getAtIndex without an error union
None of the NodeList variants can fail, but length returned !u32 and
getAtIndex !?*Node. An error union comes back through memory as two
stores read by one wider load, which can't be store-forwarded. u32 and
?*Node come back in a register.

Drops the unused error union from ChildNodes, RadioNodeList,
selector.List and HTMLFormControlsCollection.iterator too, and the try
at each caller.

Refs #349
2026-11-17 13:56:29 +01:00
Goran Mitrovic c01ca3c9e9 js: look up a returned object's identity before walking its type chain
The identity key is the start of the chain allocation, which most levels
of the chain compute the same as the leaf. Look the instance up at the
first such level, so a hit skips the walk down to the most specific type.

A type that a direct subtype embeds by value as its _proto (EventTarget
inside Node) doesn't sit at the start of the allocation; keyIsChainRoot
detects that at compile time and the lookup moves one level down. In
debug builds wrapLeaf asserts that the slot found higher up is its own.

Refs #349
2026-11-17 13:56:29 +01:00
Adrià Arrufat 74a93e16de Merge pull request #4674 from TheFpiasta/fix-trim-resources-after-worker-finished
mcp: return freed memory to the OS when an HTTP session ends
2026-11-17 13:00:30 +01:00
Felix Piasta b725f520c1 Merge remote-tracking branch 'origin/main' into fix-trim-resources-after-worker-finished 2026-11-17 12:10:13 +01:00
Karl Seguin caf5763e7b rename flags:
--v8-gc-floor-mb -> --v8-gc-auto-min-mb
--v8-gc-hint-floor-mb -> --v8-gc-request-min-mb

Keep --v8-gc-hint-floor-mb alive for backwards compatibility
2026-11-17 16:56:46 +08:00
Karl Seguin 44ac5c7bb0 Grider Layout
Adds better "display: grid" support, including some basic support for various
grid-related styles.

Also improve text wrapping to use the computed width, not just an explicit width
attribute.

Comes with a new grid-specific perf scenario (merged): https://github.com/lightpanda-io/demo/pull/316

While this adds a handful of grid-specific optimization, but it's the more
general improvements in 1.0.4 and #4651 which make this faster:

```
scenario    bin           work Mins       Δ%   task ms  wall ms        Δ%   rss MB      Δ%  reqs
style       1.0.3             290.6   +0.00%        61      340     +0.0%     36.2   +0.0%     4
style       dev               268.8   -7.50%        64      343     +0.9%     42.3  +16.9%     4
layout      1.0.3           12303.1   +0.00%       562      760     +0.0%     39.6   +0.0%     4
layout      dev              1816.0  -85.24%       126      323    -57.5%     45.3  +14.3%     4
hittest     1.0.3            2212.1   +0.00%       154      170     +0.0%     36.1   +0.0%     4
hittest     dev              2138.0   -3.35%       161      183     +7.9%     43.3  +20.1%     4
gbcr        1.0.3           12952.1   +0.00%       681      658     +0.0%     59.2   +0.0%     4
gbcr        dev              1013.6  -92.17%       112       89    -86.5%     59.4   +0.2%     4
grid        1.0.3           20076.0   +0.00%      1125     1102     +0.0%     60.0   +0.0%     4
grid        dev              1305.5  -93.50%       130      108    -90.2%     57.1   -4.9%     4
render      1.0.3             710.7   +0.00%       145      575     +0.0%     39.3   +0.0%     4
render      dev               699.6   -1.56%       145      571     -0.7%     46.3  +18.0%     4
```
2026-11-17 16:15:27 +08:00
Karl Seguin 4decec7379 crash: fix a crash on RI to an aborted transfer
Issue reportd / worked around here:  https://github.com/fastcrw/crw/pull/749

When RI loads the transfer (to continue / fulfill / fail), we need to make sure
the transfer isn't in an aborted state.
2026-11-17 15:18:03 +08:00
Karl Seguin 97a4b1de6a Merge pull request #4669 from lightpanda-io/orderfile-regen
orderfile: regenerate the hot-code profile
2026-11-17 11:31:49 +08:00
github-actions[bot] 2e9c002e4c orderfile: regenerate the hot-code profile
hot set 16736KB resident at 4KB fault-around: 21865 text, 24406 rodata symbols
2026-11-17 00:51:51 +00:00
Karl Seguin 3b4b12d6b4 perf: Adds a new flag, --v8-gc-floor-mb and change the default
This adds a --v8-gc-floor-mb flag and sets it to 32MiB. The old behavior, v8
default, is that it starts at 32MiB (same) but after each full GC, it lowers
the limit to at least what survived + 8MiB.

This is essentially a mem vs cpu flag similar to `--v8-gc-hint-floor-mb` (PR
`Isolate::MemoryPressureNotification`. This new flag is v8's own floor, under
which it does not start a full GC by itself.

The frames scenario with `--v8-gc-floor-mb 32` (new default) vs
`--v8-gc-floor-mb 0` (old default) shows the new default requiring ~28% fewer
instructions (because it runs fewer GCs)
2026-11-17 06:49:40 +08:00
Karl Seguin 88fb36db0a Merge pull request #4651 from lightpanda-io/faster-layout
Faster layout
2026-11-17 06:38:34 +08:00
Karl Seguin 26ac81d15e Merge pull request #4650 from lightpanda-io/better-layout
Better layout
2026-11-17 06:38:18 +08:00
Karl Seguin e23b3c6338 Merge pull request #4666 from lightpanda-io/stylesheet-preload
http: preload stylesheets
2026-11-17 06:37:08 +08:00
Karl Seguin c2454cb3b6 fix chrome failure 2026-11-16 23:15:53 +08:00
Karl Seguin 71a1093023 http: preload stylesheets
When --load-resources stylesheet this commit now hooks into the existing preload
to eagerly begin downloading external stylesheets.

This is meant as a replacement for #4565. It's a simpler implementation that
also provides the parallel benefit in more cases.

waiting for the download to complete. So, given:

```html
<link href="blah1.css">
<div></div>
<script>...</script>
<link href="blah2.css">
```

This commit is starts both blah1 and blah2 early, where 4565 processes one
at a time.
2026-11-16 22:36:45 +08:00
Felix Piasta da17f8392d fix: trim malloc arenas after MCP HTTP session ends to release memory held at idle 2026-11-16 13:54:56 +01:00
Karl Seguin 30c4e7c0aa perf: Add a STyleManager hitFacts
Returns everything the hit test needs from an element in a single call, avoiding
the overhead from collecting this over multiple calls.
2026-11-16 16:17:56 +08:00
Karl Seguin 67d7f788a0 perf: horizontalPosition can now resume from previous sibling work 2026-11-16 16:17:56 +08:00
Karl Seguin daf0eaa8ea perf: flowRole helper
Add a single flow role helper that can answer display none, out of flow, block,
or on the line. This removes some overhead of getting each property one at a
time.

Also, viewport change now bumps the layout memo, which makes checking for a
viewport change cheaper.
2026-11-16 16:17:55 +08:00
Karl Seguin 34f6ec31fd perf: StyleManager now optimizes parser appends
A parser append use to be treated as a full style wipe (largely, to keep parser
appends fast). Some parser appends now go through the same flow as a appendChild
and selectively clear cached results
2026-11-16 16:17:55 +08:00
Karl Seguin b73179b12f perf: stylemanager is child-selector aware
We now store a 64 bit hash of the parent, which can be used as a quick check
when a rule doesn't match.
2026-11-16 16:17:55 +08:00
Karl Seguin 591e368be6 perf: stylemanager now keeps an nth-child cache
class reach is now narrowed by the rule's subject.
2026-11-16 16:17:55 +08:00
Karl Seguin 09b5026070 nth-child and similar are now keyed by the compound
Something like li:nth-child(2) no longer matters to a list of div.rows. Similar
behavior for a ~ b which now keys off the `a`.
2026-11-16 16:17:55 +08:00
Karl Seguin fce7e28647 flex row changes only drops the widths memo 2026-11-16 16:17:55 +08:00
Karl Seguin 51ec172a6b perf: Store the vertical band (incl subtree) of elements
Using a side record, store the full vertical band, including the subtree, of
an element. This allows the hit test to skip full trees, where the element's
record vertical band doesn't contain y. This restores _some_ of the hit test
optimization that was possible with the naive l
2026-11-16 16:17:55 +08:00
Karl Seguin 8d1d75d87a perf: stylemanager focus-awareness
The StyleManager now tracks what, if anything, a focus change should invalidate.
2026-11-16 16:17:55 +08:00
Karl Seguin d79679e7db perf: Document.hitTest now keeps a running total
hitTest now keeps a running total so that each child only has to add its own
width to the total added to the parent's left edge.
2026-11-16 16:17:55 +08:00