Conversation
|
In the failing tests, as the ratio of Because of the approach here (dividing jobs based on |
|
@rclark I'm not too concerned about even distribution across jobs. Any approach (bbox, etc) is going to be datasource dependent unless the approach involves knowing the geographic shape/density of the data beforehand. I'll keep pondering the pyramid question tonight. |
|
The horrible distribution I was seeing is because the modulus approach will never put tiles into jobs where |
|
@yhahn I managed to write
The logic is a mess and I am not proud of this. |
1600f63 to
503c036
Compare
|
Okay @yhahn I fell back on straight bbox-splitting with low-zoom and along-the-boundaries duplication of rendered tiles. The logic is certainly cleaner. |
|
@rclark 👍 |
|
Now it doesn't mod-split the deserialization stream based on stream order, but by pulling the X value out of the serialized data via regex. JSON.parse (without decoding the buffer) is noticeably costly when running hundreds of jobs. I tried to set it up in an abstracted-enough way that it should be clear what would have to be done if you wanted to change serialization formats. |
|
@rclark 👍 want to merge + roll 5.3.0 or so? |
Allows you to split a read operation into an arbitrary number of jobs. Pass a
jobparameter to options when usingtilelive.createReadStreamortilelive.deserialize:This instructs tilelive to only read tiles that would fall into job
1of4. A complete read would mean four calls each with a differentnum.Still to-do:
deserialize shouldn't utilize the sameDone.x % total === num - 1approach that other streams do. That means deserializing every row before throwing out the ones that aren't part of the current job. It should skip based on row number instead.