Repository navigation
Avoid redundant source parsing during docstring extraction - #4
Merged
Merged
Conversation
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.
DocstringExtractor.extract()read and parsed callable source even though both AST and fallback branches returned the same_parse_docstring()result. This removes that redundant work, preserving dynamic__doc__handling and all existing parser behavior.The OpenHCS advanced tutorial invoked extraction 2,211 times in one compile. Direct parsing matched
DocstringInfofor 114 real CellProfiler callables; 20 passes took 0.075 s versus 1.429 s before. In a targeted A/B/A check, ExampleFly compilation was 3.989 → 2.260 → 3.976 s (old/direct/old), and advanced segmentation was 6.259 → 3.176 → 6.303 s.The full 30-case one-well OpenHCS sweep completed successfully: all 30 compiled faster; compilation sum fell from 100.065 to 58.632 s (41.4%). Observed total sum fell from 375.020 to 311.858 s. Execution and startup differences were not attributed to this compile-only patch. The python-introspect suite passes (127 tests).
Closes #3. Downstream submodule update: OpenHCSDev/openhcs#175.