Skip to content

[boto] Use frames directly without calling getouterframes()#243

Merged
wackywendell merged 1 commit into
masterfrom
wendell/boto-inspect
Apr 4, 2017
Merged

[boto] Use frames directly without calling getouterframes()#243
wackywendell merged 1 commit into
masterfrom
wendell/boto-inspect

Conversation

@wackywendell

Copy link
Copy Markdown
Contributor

Using inspect.py's getouterframes() function can have a performance cost; in the attached flamegraph, it looks like it spends as much time in there as it does fetching.

Luckily, it looks like we only need the name of the frame above, which does not require a full call to getouterframes(). This PR asks for the parent of the parent's name, and uses that.

screen shot 2017-04-04 at 1 25 01 pm

@talwai talwai requested a review from raphaelgavache April 4, 2017 18:15
@wackywendell wackywendell merged commit 928e829 into master Apr 4, 2017
@wackywendell wackywendell deleted the wendell/boto-inspect branch April 4, 2017 20:30
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