Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

scopeRouteVariants repeats shared-input work for every route in compose

クローズ
#3,698 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
performance

調査の方向性

Start by reading CssStylesheetTransformer::scopeRouteVariants, RouteSelectorMatchIndex::inertOutside, and the cited scopeRouteUnit and markerCarriers paths; compare their work across routes during compose. Profile the 112-page import described in the issue and check output against the current byte-identical result. Done means shared-input work runs once, repeated element/arm matching is avoided, and output remains byte-identical.

索引モデルが issue の本文から書いたものです。

説明

Problem

In compose, CssStylesheetTransformer::scopeRouteVariants costs 60 s of a 310 s compose on a 112-page real import (BE trunk after #3675/#3676). Profile, by child:

  • RouteSelectorMatchIndex::inertOutside → CssSelectorMatcher::matches: 19 s. The same selector arm is matched against each route DOM in turn, through candidate lists rebuilt per (arm, owner).
  • scopeRouteUnit → scopeRouteArms → CssSelectorTokenizer::tokenize / pseudoElementOffset / splitSelectorList: ~8 s. Identical shared units are tokenized again for each route's probe validation.
  • markerCarriers: 4 s. isWellFormedStylesheet over shared plus page sheets for each route: ~3 s. The shared sheets are re-checked for every route.

This work cannot move to page workers: base selection and attribute-marker reconciliation span all routes (#2089).

Expected

Inside compose, work that depends only on the shared input is done once rather than once per route: shared-sheet well-formedness, unit keys, probe results and parsed arms. inertOutside answers "does arm X match any route outside the set" without re-matching the same element/arm pairs per owner. Output stays byte-identical.

主要言語
PHP
スター
22
フォーク
3
平均マージ
7時間 3分
マージ済み PR(30日)
779

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/blocks-engine のほかの issue

Automattic/blocks-engine の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。