Filter by geometries by bbox
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- cpp, javascript
- 領域
- performance
調査の方向性
bench/vtquery.bench.js から始め、query: all things - dense nine tiles に対して、ドキュメントに記載されたベンチマーク node bench/vtquery.bench.js --iterations 5000 --concurrency 1 を実行します。ジオメトリの割り当てと解放を含め、mapbox::vector_tile::extract_geometry を通るパスをプロファイリングし、closest_point および vtzero の呼び出しと比較します。クエリの動作を変更せずに、大きな半径で複数タイルを対象とするクエリのレイテンシを削減できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I ran the slowest/most intense benchmark (query: all things - dense nine tiles) on OS X using node bench/vtquery.bench.js --iterations 5000 --concurrency 1 and a patch to disable all other tests besides query: all things - dense nine tiles. Then I profiled in Activity Monitor during the run.
What I see is:
- The majority of time is taken (nearly 40%) in the thread is in
mapbox::vector_tile::extract_geometrydue to calls tonewanddelete(memory allocation and deallocation) - Then another 10% is spent in deallocating the geometry objects created by
mapbox::vector_tile::extract_geometrywhich show in profiling as adeletecall insidemapbox::util::detail::variant_helper<mapbox::geometry::polygon ...(which I think is themapbox::geometry_baseat https://github.com/mapbox/geometry.hpp/blob/96d350510c0e6738a903be40e8138c7305f3e33f/include/mapbox/geometry/geometry.hpp#L23) - Then another 10% is spent in running
mapbox::geometry::algorithms::detail::closest_point - The remainder is tiny %s of various things include vtzero (like
vtzero::layer::next_feature())
My interpretation is that:
- Parsing with vtzero is extremely cheap
- Running closest_point is also pretty cheap
- Decoding into
mapbox::geometryobjects is expensive due to memory allocation and deallocation
And therefore our overwhelming bottleneck (where > 50% of the time is taken) is mapbox::vector_tile::extract_geometry (https://github.com/mapbox/vector-tile/blob/97d8b89fe635f117ce7de25790028a65d9ce5172/include/mapbox/vector_tile.hpp#L15)
So, to reduce the latency of scenarios like this (large radius and multiple tiles) we'll need to speed up mapbox::vector_tile::extract_geometry.
Profiling output: https://callgraph.herokuapp.com/76849341d35452543e35c504964dcb94#thread-6
/cc @mapsam @flippmoke
- 主要言語
- JavaScript
- スター
- 45
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mapbox/vtquery のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
-
union geometriesオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
Design only Leadership Survey SLFS
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
bcgov/digital-journeys#2293 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tursodatabase/turso#9405 ·
メンテナーはふだん 1 日以内に返信
-
Toolkit
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
API Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
メンテナーはふだん 1 日以内に返信