jonhoo / inferno

A Rust port of FlameGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove `SmallVec` in favor of using a long-term `Vec`

jonhoo opened this issue · comments

See #78 (comment). Specifically, currently we use a SmallVec for temporarily holding inlined java method calls:

let mut java_inline =
SmallVec::<[String; 1]>::with_capacity(rawfunc.split("->").count() + 1);

However, in #78, @Licenser decided to instead re-use a Vec in the Folder, which seems like a better strategy since it generally won't allocate even if there are inlined method calls (unlike SmallVec, which will allocate every time that happens).