Faster node tables - #257
Merged
Merged
Conversation
… Arrow
`read_node_table` built its value matrix with `reduce(vcat, generator)`. Base's
fast `reduce(::typeof(vcat), ::AbstractVector{<:AbstractVecOrMat})` does not
match a generator, so it fell back to `foldl` and copied the whole matrix once
per row. Parsing straight into a preallocated matrix is 21x faster on a 16 MB
surface table (2.49 s to 0.12 s) and 15x over a full dataset: the 90 SK100
pressure tables, 1.33 GB, go from 176.6 s to 11.7 s. No API change, so every
existing dataset gets it.
`table_format` on `write_section_aero`, threaded through `generate_airfoils`,
`obj_to_yaml` and `surfplan_to_aero_yaml`, writes those tables as Arrow instead:
another 39x (0.003 s per table) and 2.6x smaller on disk. It defaults to `:csv`,
and `read_section_aero` picks the format from the file suffix, so a geometry
YAML can reference either and existing data keeps working untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
write_node_rows writes a per-node table from the flat (alpha, delta, values) form read_node_table returns, picking the format from the destination suffix, and convert_node_table pairs the two. write_node_table now delegates to it rather than carrying its own copy of the format branch. obj_to_yaml migrates a cached dataset when table_format differs from what the directory holds, so switching an existing 1.4 GB pressure dir from :csv to :arrow costs one rewrite instead of re-running the NeuralFoil polars that produced it. The source tables are left in place. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The docstring lives in ObjAdapter, so listing it under the AirfoilAero @docs block left the binding undefined and the docstring uncounted, failing the docs build. Test the format migration end to end, which was the bulk of the uncovered patch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Documenter resolves a bare @ref in the module the docstring is rendered under, so refs pointing into another submodule silently degraded to plain text. Give those an explicit qualified target, document the three names that had no docstring to link to (solve_base!, PLATE_FACES, and POLY via its enum), and drop warnonly=[:cross_references] so a broken ref fails the build instead of passing quietly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Arrow.Table(path) memory-maps the file, and Windows refuses to unlink or overwrite a mapped file for the rest of the session — so regenerating a dataset, or deleting one, failed after anything had loaded it. Costs 5.6 ms on a 15 MiB table, against the 2.5 s the CSV path took. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
No description provided.