getsentry / pdb

A parser for Microsoft PDB (Program Database) debugging information
https://docs.rs/pdb/
Apache License 2.0
368 stars 68 forks source link

Remove scroll derive. #70

Closed RazrFalcon closed 4 years ago

RazrFalcon commented 4 years ago

This patch replaces Pread derive with manual implementations. It makes the source code a bit bigger, but reduces the compilation time at least by half on my CPU.

Multi-threaded build:

# before
> cargo clean; cargo build --release
   Compiling ...
    Finished release [optimized] target(s) in 7.55s

#after
> cargo clean; cargo build --release
   Compiling ...
    Finished release [optimized] target(s) in 4.26s

Single-threaded build:

# before
> cargo clean; cargo build --release
   Compiling ...
    Finished release [optimized] target(s) in 32.05s

#after
> cargo clean; cargo build --release
   Compiling ...
    Finished release [optimized] target(s) in 14.80s

Build on CI takes 49.29s instead 58.35s of now. Not sure why the difference is that small.

PS: I understand that this is a controversial patch.

RazrFalcon commented 4 years ago

Nice!