Repository navigation
docs(spec): spec 003, faster evaluation of faulted models - #384
Merged
Merged
Conversation
The spec asks for golden tests and benchmarks first, then for an evaluation that applies each fault set once in one evaluation call. research.md has the analysis of the present code and the baseline numbers, and measure_baseline.py makes the synthetic baseline again.
- The tolerances stay as they are. - The real-data golden model is the plugin model, after it is refined. - Restored points can be kept between calls, with invalidation on each model change, a size limit and thread safety (FR-009, FR-010, FR-010a, SC-010). - The benchmarks use pytest-benchmark and run only on a developer's computer, not in CI.
data/plugin_model/ has the LoopStructural calls that the QGIS plugin made (recorded from the plugin), the data of each feature, the solved field of each interpolator, and values of the model in QGIS at 5000 points. plugin_model.py builds the model without QGIS from these files, with the stored fields (no solve), and gives the same values as in QGIS (difference 0). The spec and research.md record the answer to C-002, a new FR-001a (stored fields, so that the golden results do not depend on the solver), and what a golden model with stored fields must do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds
specs/003-fault-evaluation-performance/. This PR has documents only, no code.Why
Rendering a model with faults and unconformities is slow, and it becomes slower with each fault and each unconformity. Nearly all of the time goes into the faults: in a QGIS plugin model with six faults, the field of the group takes 0.01 s for 20 000 points, and the same evaluation with the faults takes 8.2 s. Each unconformity region applies the faults of its parent to the same points again, and
evaluate_modeldoes this again for each group. With 4 faults and 3 unconformities, an evaluation of all the groups makes 52 fault applications, where 4 are sufficient.Files
spec.md: the spec. The user stories, in order:pytest-benchmark(not in CI);The clarifications are answered. Only the golden results of the plugin model wait, until that model is refined.
research.md: the analysis of the present code (with line references for 1.11.0), the profile of the plugin model, and a baseline table for 0–4 faults and 0–3 unconformities.measure_baseline.py: the script that makes the baseline table again.🤖 Generated with Claude Code