perf: Parse SVG once in semantic_analyzer instead of 6+ times #30
Labels
No labels
blocked:children
blocked:depends-101
blocked:depends-103
blocked:depends-104
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:preflight
bug
chore
feature-request
in-progress
lint-cleanup
needs-decompose
performance
quality
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/easystitch#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
semantic_analyzer.py— each public method independently parses the SVG from string. When pipeline calls multiple methods on same SVG, the same string is parsed repeatedly.Proposed Fix
Parse once in
annotate_svgand pass the parsed tree to internal methods.Impact
2-4x faster for pipeline runs.
Files
src/svg_annotation/semantic_analyzer.py