Closed who8mycakes closed 7 years ago
I used a very large GeoJSON file (1.3GB) to get a baseline for processing time before making changes to geojson.js. The result was: 1m32.501s
.
After increasing num_to_features_query to 10000
, the processing time increased to 1m44.331s
, which took an additional 11.83s
.
Running through processing a couple of times to account for cache-like behavior: (before = num_to_features_query = 5; after = num_to_features_query = 10000)
before | after | Delta | |
---|---|---|---|
10s 850ms | 12s 496ms | 1s 646ms | |
10s 833ms | 12s 983ms | 2s 150ms | |
9s 910ms | 11s 579ms | 1s 669ms | |
9s 963ms | 11s 474ms | 1s 511ms | |
9s 921ms | 11s 148ms | 1s 227ms | |
Average | 10s 295ms | 11s 936ms | 1s 641ms |
Noting that the GeoJSON file I was benchmarking has 710,145 features, I increased num_to_features_query
to 1M:
1M --- | 2m 40s 977ms 1m 34s 712ms 39s 481ms 40s 457ms 42s 411ms 1m 9s 917ms 1m 0s 780ms
Pre-implementation of changes: start time [Fri, 03 Feb 2017 20:04:42 GMT] end time: [Fri, 03 Feb 2017 20:05:57 GMT] (1m 15s)
Here are the properties that were pulled from the test geojson file:
22 properties | This layer contains mostly Points
geo_longitude Number
Shape String
Height String
Site String
Wall String
City String
River String
Nickname String
Avenue String
Destination String
Lake String
Province String
Town String
Address String
Terrain String
location String
Country String
Title String
geo_latitude Number
Builder String
Square String
Boulevard String
These are the properties from the first 5 features, as the parameters are currently set.
@GretaCB As you review, I'd be interested to see if you think I could make this section of my test a bit more elegant: https://github.com/mapbox/mapnik-omnivore/pull/162/files#diff-50dbdad073e034de4a02c9507d0541cc
@who8mycakes great question. Not sure if you'll need quite as extensive of a setup as mapbox-upload-validate
, but it uses an /expected
dir to hold all expected json and other error strings. So you can store the expected json in a file, then use it like so, or whatever makes sense based on how you set it up.
Here are the PRs I've set up for testing on staging:
I tested the same fixture on staging, and met with success as all 35 unique properties of the features were captured:
start time: [Tue, 07 Feb 2017 23:18:21 GMT] end time: [Tue, 07 Feb 2017 23:19:47 GMT] (1m 26s)
cc @GretaCB @mapsam @springmeyer
35 properties | This layer contains mostly Points
Port String
Parliament String
geo_longitude Number
Shape String
Film String
Material String
Height String
Nation String
Site String
Capital String
Wall String
City String
Border String
River String
Nickname String
Avenue String
Destination String
Sea String
Abode String
Lake String
Province String
Town String
Neighbor String
Address String
Terrain String
location String
Ruler String
Country String
Title String
Ally String
geo_latitude Number
Builder String
Square String
Boulevard String
Group String
@who8mycakes woot! 🎉 Nice work 22 properties
--> 35 properties
Are the processing times in staging pre/post inline with your benchmarking?
Implementing https://github.com/mapbox/mapnik-omnivore/issues/127.
This PR's objectives are:
num_features_to_query=<N>
ornum_features_to_query > <N>
whereN
is the number of features.