Skip to content

Dict->IdDict in exception types #927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2021
Merged

Dict->IdDict in exception types #927

merged 2 commits into from
Oct 24, 2021

Conversation

timholy
Copy link
Contributor

@timholy timholy commented Oct 17, 2021

Dicts use extensive specialization and this adds latency.
IdDicts don't and are the go-to associative container
for type-keys.

This one change reduces startup time by ~0.35s: in fresh sessions, with the package already precompiled, and --startup-file=no, master is

julia> tstart = time(); using PyCall; time() - tstart
1.188127040863037

whereas this branch is

julia> tstart = time(); using PyCall; time() - tstart
0.8567991256713867

Dicts use extensive specialization and this adds latency.
IdDicts don't and are the go-to associative container
for type-keys.
@timholy
Copy link
Contributor Author

timholy commented Oct 17, 2021

The `::Dict`, being an abstract annotation, wouldn't have been all
that much help anyway.
@KristofferC
Copy link
Contributor

@tkf, @stevengj, could this be merged (or at least allow CI to run). It is a quite significant load time improvement.

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2021

Codecov Report

Merging #927 (146c1ec) into master (8a98fb4) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #927      +/-   ##
==========================================
- Coverage   68.03%   68.02%   -0.01%     
==========================================
  Files          20       20              
  Lines        1980     2033      +53     
==========================================
+ Hits         1347     1383      +36     
- Misses        633      650      +17     
Flag Coverage Δ
unittests 68.02% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/io.jl 83.33% <ø> (+0.23%) ⬆️
src/exception.jl 60.74% <100.00%> (-0.80%) ⬇️
src/pydates.jl 93.10% <0.00%> (-3.27%) ⬇️
src/pybuffer.jl 61.11% <0.00%> (-0.80%) ⬇️
src/pyarray.jl 70.00% <0.00%> (-0.55%) ⬇️
src/pyeval.jl 70.47% <0.00%> (-0.12%) ⬇️
src/gui.jl 0.00% <0.00%> (ø)
src/conversions.jl 63.32% <0.00%> (+<0.01%) ⬆️
src/pyclass.jl 96.72% <0.00%> (+0.05%) ⬆️
... and 7 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 8a98fb4...146c1ec. Read the comment docs.

@tkf
Copy link
Member

tkf commented Oct 23, 2021

LGTM!

The CI failures are unrelated (fixing it in #930)

@tkf tkf closed this Oct 24, 2021
@tkf tkf reopened this Oct 24, 2021
@tkf tkf closed this Oct 24, 2021
@tkf tkf reopened this Oct 24, 2021
@tkf tkf enabled auto-merge (squash) October 24, 2021 01:32
@tkf tkf merged commit 4be534b into JuliaPy:master Oct 24, 2021
@timholy timholy deleted the teh/loadtime branch October 24, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants