Skip to content

Speed up testcase decoration by avoiding inspect.getsourcelines and avoid repeated calls for LocationMetadata.from_object - #1311

Merged
dteo00 merged 1 commit into
morganstanley:mainfrom
dteo00:speedup_startup
May 5, 2026
Merged

Speed up testcase decoration by avoiding inspect.getsourcelines and avoid repeated calls for LocationMetadata.from_object#1311
dteo00 merged 1 commit into
morganstanley:mainfrom
dteo00:speedup_startup

Conversation

@dteo00

@dteo00 dteo00 commented May 4, 2026

Copy link
Copy Markdown
Member

Bug / Requirement Description

Clearly and concisely describe the problem.

Solution description

Use func.__code__.cofilename when possible and refactor a call out of a loop

Checklist:

  • Test
  • Example (both test_plan.py and .rst)
  • Documentation (API)
  • News fragment present for release notes
  • MS info leakage check
  • For new driver: driver index page
  • For new assertion: ui/pdf/std renderers, documentation
  • For new cmdline arg: documentation

@dteo00 dteo00 changed the title Speed up testcase decoration by avoiding inspect.getsourcelines, add cache and avoid repeated calls for LocationMetadata.from_object Speed up testcase decoration by avoiding inspect.getsourcelines and avoid repeated calls for LocationMetadata.from_object May 4, 2026
@dteo00
dteo00 force-pushed the speedup_startup branch 2 times, most recently from 42f89a5 to ec2ead2 Compare May 4, 2026 09:04
…void repeated calls for LocationMetadata.from_object

Co-authored-by: Claude Code / claude_opus_4.7
@dteo00
dteo00 force-pushed the speedup_startup branch from ec2ead2 to 50fbc00 Compare May 4, 2026 09:06
@dteo00
dteo00 marked this pull request as ready for review May 5, 2026 03:15
@dteo00
dteo00 requested a review from a team as a code owner May 5, 2026 03:15
@dteo00
dteo00 merged commit 1e8df06 into morganstanley:main May 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants