Fix: Remove bucket linking to avoid regression in "Precise Forestry" preset #340
+13
−99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR removes the recently introduced bucket linking optimization.
While bucket linking provided a modest speedup (~5%) for small sliding windows, it introduces a linear linking pass over all indoor buckets and only works for integer indoor/outdoor bucket ratios. For presets with very large sliding windows (notably "Precise Forestry", 10 km), this leads to a performance regression as bucket maps become large and linking cost dominates.
To avoid preset-dependent behavior and reduce code complexity, bucket linking is removed entirely in favor of the simpler hash-based lookup path.
Related issue: #339
Changes
coarser_bucketand related helpers)Impact
Notes
Bucket linking was designed for typical small sliding windows but does not scale to large-window presets and adds complexity for a relatively small gain. Removing it avoids future regressions and keeps behavior consistent across presets.