Skip to content

Add some extra profiling trace points. #1169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 24, 2019
Merged

Add some extra profiling trace points. #1169

merged 6 commits into from
Jul 24, 2019

Conversation

windelbouwman
Copy link
Contributor

@windelbouwman windelbouwman commented Jul 23, 2019

I added some extra tracepoints. This gives a nice hint on where to improve.

To run this, use: cargo run --features flame-it demo.py and upload flamescope.json into http://speedscope.app

Also moved the get_item_option function into the PyDictRef struct, since it was only used for that case.

@@ -271,6 +273,7 @@ enum LookupResult {
Existing(EntryIndex), // Existing record, index into entries
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string passed to flame is a prefix, so this would appear in the output as collection_hash::collection_hash. I'd recommend changing it to dictdatatype or removing the prefix altogether.

@@ -1021,6 +1021,8 @@ pub trait ItemProtocol {
vm: &VirtualMachine,
) -> PyResult;
fn del_item<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> PyResult;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be flame("ItemProtocol")?

@coolreader18 coolreader18 merged commit 7d2a7a5 into master Jul 24, 2019
@windelbouwman windelbouwman deleted the optimizations1 branch September 1, 2019 09:38
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