Move Tables.jl and IteratorInterfaceExtensions.jl to extension for faster precompilation#473
Merged
ChrisRackauckas merged 5 commits intoSciML:masterfrom Aug 4, 2025
Conversation
This change moves the Tables.jl integration functionality to a package extension to reduce precompilation time by avoiding loading heavy table-related dependencies when they are not needed. Changes: - Move Tables.jl and IteratorInterfaceExtensions.jl from deps to weakdeps - Create RecursiveArrayToolsTablesExt extension with all table traits - Remove tabletraits.jl from main module - Reduce compilation time from ~309ms to ~245ms (~20% improvement) The Tables interface remains fully functional when Tables.jl is loaded, but no longer impacts basic RecursiveArrayTools usage. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Since Tables.jl and IteratorInterfaceExtensions.jl were moved to an extension, the test files need to import them directly rather than trying to import them from RecursiveArrayTools. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Since these packages are now weak dependencies, they need to be explicitly included in the test targets to ensure the Tables functionality tests run. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This change creates a separate extension for IteratorInterfaceExtensions.jl functionality, providing more granular control over dependency loading. Changes: - Create RecursiveArrayToolsIteratorInterfaceExtensionsExt for isiterable() - Keep getiterator() in TablesExt since it requires Tables.jl functionality - Update Project.toml to include the new extension - Avoid method conflicts by having isiterable only in the IIE extension This allows users who only need the basic iterator interface to load just IteratorInterfaceExtensions without pulling in the full Tables.jl dependency chain. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit e11e6a6.
The AI must have done some p-hacking..
Due to indirect dependencies, all of these packages / extensions still load all of the time (SciML/LinearSolve.jl#573 (comment)) |
Member
|
Fixed by also removing the tables from Symbolic indexing interface. |
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.
Summary
This PR moves Tables.jl and IteratorInterfaceExtensions.jl functionality to a package extension to significantly reduce precompilation time by avoiding loading heavy table-related dependencies when they are not needed.
Changes Made
TablesandIteratorInterfaceExtensionsfrom[deps]to[weakdeps]in Project.tomlRecursiveArrayToolsTablesExtextension that loads when both Tables.jl and IteratorInterfaceExtensions.jl are availabletabletraits.jlinclude and imports from the main modulePerformance Impact
Testing
Compatibility
using Tablesis calledThis change should help reduce SciMLBase precompilation time by eliminating unnecessary dependency loading for basic RecursiveArrayTools usage while maintaining full Tables.jl integration when needed.
🤖 Generated with Claude Code