Drvi / ProtocolBuffers.jl

4 stars 0 forks source link

Various refactors that reduce compilation latency #9

Closed Drvi closed 2 years ago

Drvi commented 2 years ago

master:

julia> import ProtocolBuffers as PB
[ Info: Precompiling ProtocolBuffers [33b38db7-f37a-4066-8d88-48be842fb53f]

julia> @time  PB.protojl("test_protos/google/protobuf/unittest.proto", ["./test/", "./test/test_protos/"], "dev/tst2", add_kwarg_constructors=true);
  3.893629 seconds (10.20 M allocations: 531.138 MiB, 4.36% gc time, 98.44% compilation time)

PR:

julia> import ProtocolBuffers as PB

julia> @time  PB.protojl("test_protos/google/protobuf/unittest.proto", ["./test/", "./test/test_protos/"], "dev/tst2", add_kwarg_constructors=true);
  1.074081 seconds (1.91 M allocations: 100.595 MiB, 1.30% gc time, 98.22% compilation time)
codecov[bot] commented 2 years ago

Codecov Report

Merging #9 (4b2f7fe) into master (d464ab7) will decrease coverage by 3.14%. The diff coverage is 87.86%.

:exclamation: Current head 4b2f7fe differs from pull request most recent head 7721d7d. Consider uploading reports for the commit 7721d7d to get more accurate results

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
- Coverage   89.52%   86.38%   -3.15%     
==========================================
  Files          22       23       +1     
  Lines        2502     2629     +127     
==========================================
+ Hits         2240     2271      +31     
- Misses        262      358      +96     
Impacted Files Coverage Δ
src/ProtocolBuffers.jl 85.71% <ø> (ø)
src/codegen/modules.jl 79.74% <ø> (-3.59%) :arrow_down:
src/precompile.jl 0.00% <0.00%> (ø)
src/codegen/encode_methods.jl 68.59% <73.46%> (-22.62%) :arrow_down:
src/lexing/Lexers.jl 87.27% <77.77%> (-3.02%) :arrow_down:
src/codegen/CodeGenerators.jl 84.84% <83.87%> (-15.16%) :arrow_down:
src/parsing/utils.jl 73.40% <97.14%> (+0.16%) :arrow_up:
src/codegen/types.jl 94.05% <97.43%> (-0.84%) :arrow_down:
src/codegen/decode_methods.jl 98.88% <100.00%> (+0.05%) :arrow_up:
src/codegen/defaults.jl 96.38% <100.00%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d464ab7...7721d7d. Read the comment docs.