Filter by geometries by bbox
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cpp, javascript
- Lĩnh vực
- performance
Hướng nghiên cứu
Bắt đầu với bench/vtquery.bench.js và chạy benchmark được ghi trong tài liệu node bench/vtquery.bench.js --iterations 5000 --concurrency 1 cho query: all things - dense nine tiles. Profile đường đi qua mapbox::vector_tile::extract_geometry, bao gồm việc cấp phát và giải phóng geometry, rồi so sánh với các lời gọi closest_point và vtzero. Hoàn thành có nghĩa là giảm độ trễ cho các truy vấn bán kính lớn trên nhiều tile mà không thay đổi hành vi truy vấn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 45
- Fork
- 14
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/vtquery
-
Remove mason-js dependencyĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
More efficient response formatĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
-
union geometriesĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của mapbox/vtquery
Issue tương tự
-
feature task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
RealDevSquad/website-www#1178 ·
-
add latest sol modelĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
netlify-labs/nax#56 · 2 bình luận · 1 reaction ·
-
accessibility bug revealjs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
quarto-dev/quarto-cli#14961 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
PnX-SI/GeoNature#4435 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openlayers/openlayers#17648 ·
Maintainer thường phản hồi trong vòng 1 ngày