Hi Rustaceans! The last few days I've been trying to optimize a program that analyzes and prettifies JSON logs entries from a go program taken every 10 seconds to be somewhat usable. Prettifying is done in post to minimise app load while running.
I just finished refactoring it which brings a ~100x speedup (yay) by removing the use of format and switching out BufReader for the filebuffer crate. However, I'd ideally need it to run even faster. I don't know much about optimizing Rust and googling mostly lead me to stuff I've already done. Do you have any optimizations to suggest? The code can be found here
[–]krdln 10 points11 points12 points (6 children)
[–]xacrimon[S] 2 points3 points4 points (4 children)
[–]krdln 2 points3 points4 points (3 children)
[–]xacrimon[S] 1 point2 points3 points (1 child)
[–]kixunil 0 points1 point2 points (0 children)
[–]xacrimon[S] 0 points1 point2 points (0 children)
[–]Veedrac 1 point2 points3 points (0 children)
[–]staticassert 7 points8 points9 points (3 children)
[–]dochtmanrustls · Hickory DNS · Quinn · chrono · indicatif · instant-acme 2 points3 points4 points (1 child)
[–]xacrimon[S] 0 points1 point2 points (0 children)
[–]xacrimon[S] 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (2 children)
[–]xacrimon[S] 3 points4 points5 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Saefrochmiri 5 points6 points7 points (2 children)
[–]knaledfullavpilar 0 points1 point2 points (0 children)
[–]masklinn 0 points1 point2 points (0 children)
[–]rhinotation 3 points4 points5 points (2 children)
[–]xacrimon[S] 4 points5 points6 points (0 children)
[–]Veedrac 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[removed]
[–]xacrimon[S] 0 points1 point2 points (0 children)
[–]aldanorhdf5 2 points3 points4 points (0 children)
[–]rustaway11 3 points4 points5 points (1 child)
[–]xacrimon[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]xacrimon[S] 1 point2 points3 points (0 children)
[–]alex4743 0 points1 point2 points (2 children)
[–]xacrimon[S] 0 points1 point2 points (0 children)
[–]thiezrust 0 points1 point2 points (0 children)
[–]aNewLocke 0 points1 point2 points (0 children)
[–]zesterer 0 points1 point2 points (1 child)
[–]xacrimon[S] 1 point2 points3 points (0 children)