Add PrecompileTools.jl to reduce time-to-first-execution; Update to PrettyTables.jl v3 API #83
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.
This PR adds comprehensive precompilation support using PrecompileTools.jl to significantly reduce the time-to-first-execution when loading and using PowerFlowData.jl.
Changes
Project.toml@setup_workloadand@compile_workloadmacrosPerformance Impact
After this change, parsing operations are nearly instantaneous:
The precompilation adds ~7-8 seconds to package installation time but eliminates all JIT compilation during first use, providing a much better user experience.
Testing
All 291 existing tests pass without modification.
PrettyTables.jl v3 API
This PR also updates the package to support PrettyTables.jl v3, which introduced breaking API changes. The
showmethods forRecordstypes have been updated to use the new v3 API:header→column_labels,crop→fit_table_in_display_horizontally/vertically,newline_at_end→new_line_at_end,vcrop_mode→vertical_crop_mode, andalignment_anchor_regexnow acceptsVector{Regex}instead ofDict. The package now supports PrettyTables versions 3 only.