diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-12-11 19:54:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 19:54:02 -0500 |
commit | 8c4ad90e6756a006243f04033ae9bd9bc9e2f095 (patch) | |
tree | 1e189aea1cb5f497ee7207c184528e77a82c2c01 /src/bin | |
parent | 86135e466ce437de5fd767b29fad9acae29cef93 (diff) |
refactor: Another small optimization pass (#350)
Making some small changes that would hopefully improve performance a bit.
- Remove redundant string generations for CPU data conversion
- Switch to fnv for PID hashmap and hashsets
- Use buffered reading to avoid having to store too many lines as strings
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index 8e143a39..320b100a 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -215,8 +215,12 @@ fn main() -> Result<()> { if app.used_widgets.use_cpu { // CPU - app.canvas_data.cpu_data = - convert_cpu_data_points(&app.data_collection, false); + + convert_cpu_data_points( + &app.data_collection, + &mut app.canvas_data.cpu_data, + false, + ); } // Processes |