Closed rofinn closed 4 years ago
Merging #164 into master will decrease coverage by
1.80%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
- Coverage 96.99% 95.19% -1.81%
==========================================
Files 12 13 +1
Lines 333 333
==========================================
- Hits 323 317 -6
- Misses 10 16 +6
Impacted Files | Coverage Δ | |
---|---|---|
src/Memento.jl | 100.00% <ø> (ø) |
|
src/config.jl | 100.00% <ø> (ø) |
|
src/formatters.jl | 92.15% <100.00%> (-5.85%) |
:arrow_down: |
src/precompile.jl | 100.00% <100.00%> (ø) |
|
src/handlers.jl | 94.23% <0.00%> (-5.77%) |
:arrow_down: |
src/records.jl | 89.28% <0.00%> (-3.58%) |
:arrow_down: |
src/loggers.jl | 98.19% <0.00%> (-0.91%) |
:arrow_down: |
src/exceptions.jl | 66.66% <0.00%> (+16.66%) |
:arrow_up: |
... and 1 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 6051407...4c092dc. Read the comment docs.
FWIW, minimizing the changes is a little worse, but not too bad:
julia> @time using Memento
0.764168 seconds (1.41 M allocations: 78.336 MiB, 2.05% gc time)
Due to calling
config!
andregister
in the__init__
function our load times were on the order of a few seconds. To address this issue we've cached some default values (e.g., formatter, localzone) and added some precompile logic.Before:
After:
NOTE: While
@time
isn't very reliable for times, you can see that we've reduced the number of allocations and amount of memory being allocated by about 1/2 and 1/3 respectively.Similar to #163, but doesn't require lowering the optimization level.