Repository navigation
Commit 9fa8255
Share the sibling index with the queries :has() runs
findsAny() built each per-element and per-sibling traverser with its own
PseudoClass, so with #119's index every one re-indexed its sibling list:
li:has(~ li:nth-child(1)) over 400 siblings took about 9 s. It now passes
its own handler, as is() does, which also lets a nested :has() reuse the
parsed-argument cache (about 0.26 s).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent d48cdc0 commit 9fa8255
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
724 | 746 | | |
725 | 747 | | |
726 | 748 | | |
| |||
0 commit comments