Skip to content

Commit ea078ac

Browse files
authored
Merge pull request #392 from pythonspeed/390-workaround
Workaround for slow flamegraph rendering
2 parents 6431d27 + 4bbbc1d commit ea078ac

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.changelog/390.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Speed up rendering of flamegraphs in cases where there are many smaller allocations, by filtering out allocations smaller than 0.2% of total memory. Future releases may re-enable showing smaller allocations if a better fix can be found.

memapi/src/flamegraph.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ pub fn get_flamegraph<I: IntoIterator<Item = String>>(
135135
options.reverse_stack_order = reversed;
136136
options.color_diffusion = true;
137137
options.direction = flamegraph::Direction::Inverted;
138+
options.min_width = 0.2;
138139
// Maybe disable this some day; but for now it makes debugging much
139140
// easier:
140141
options.pretty_xml = true;

0 commit comments

Comments
 (0)