Skip to content
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

upgrade to ColorVectorSpace 0.9 and reduce latency #157

Merged
merged 7 commits into from
Apr 21, 2021
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Feb 9, 2021

Through better design and precompilation, this shaves about 30% off the
time to run the tests. Of course, the more important consequence is that it
should reflect reductions in "time to first computation" for typical usage.

Perhaps the biggest change, though, is this now loads ColorVectorSpace (the new version 0.9) so that it's always loaded throughout JuliaImages.

closes #158

Through better design and precompilation, this shaves about 30% off the
time to run the tests.
@timholy timholy changed the title Update dependencies, reduce latency Update dependencies, reduce latency (ImageCore 0.9) Feb 9, 2021
@timholy
Copy link
Member Author

timholy commented Feb 9, 2021

Test failures are due to [compat] bounds in downstream consumers (ReferenceTests, ImageMagick, and ImageInTerminal).

@Tokazama
Copy link
Contributor

Tokazama commented Mar 7, 2021

I think SpatioTemporalTraits.jl is at a point where the next set of changes will probably be tests, updating the README, and changes b/c of feedback. I'm currently trying to get rid of a bunch of dead code elsewhere that ArrayInterface now houses instead (and a whole lot of related experimental bloat code). Once that's done I should be able to get robust tests for SpatioTemporalTraits, using AxisIndices.jl (which liberally borrows tests from most of the array provides that Images.jl uses). The code is already fairly well optimized because it uses ArrayInterface.jl for getting dimensions and axes across permuted/subset/transposed dimensions.

I'm hoping we can slowly get more packages using ArrayInterface, which will make it so that we don't have to define a bunch of new parametric types for packages like MosaicArrays to work with spatially labelled dimensions. For the time being I'll probably have to replace some calls to Base.axes with ArrayInterface.axes, but I think we can eventually get to the point where deeply nested dimensional labeled arrays could have working and inferable calls like reverse(A, dim=is_spatial.

You could probably start looking at the the code if you want to ensure you at least feel comfortable with the syntax. I was hoping to get too some backend stuff in ArrayInterface that would make it easy to support MappedArrays, but that might have to wait a couple weeks because my schedule is pretty crazy for the next week.

@johnnychen94
Copy link
Member

johnnychen94 commented Apr 14, 2021

For 43c37d5: I've separated the MosaicViews part from this PR into #162; it's totally fine to get that into ImageCore 0.8.x release

@johnnychen94
Copy link
Member

johnnychen94 commented Apr 15, 2021

To smoothly migrate to ColorVectorSpace(CVS) 0.9, I'll separate the task into three steps:

Otherwise, it's a little bit hard to make the CI and Pkg happy.

This makes CI happy because downstream consumers has not yet decleared
their compatibility to ImageCore 0.9
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #157 (6f6b4ae) into master (5b2202d) will decrease coverage by 3.86%.
The diff coverage is 8.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   66.42%   62.56%   -3.87%     
==========================================
  Files          10       10              
  Lines         563      561       -2     
==========================================
- Hits          374      351      -23     
- Misses        189      210      +21     
Impacted Files Coverage Δ
src/ImageCore.jl 71.42% <ø> (ø)
src/convert_reinterpret.jl 60.00% <ø> (ø)
src/deprecations.jl 0.00% <ø> (-57.50%) ⬇️
src/precompile.jl 0.00% <0.00%> (ø)
src/colorchannels.jl 48.93% <100.00%> (ø)
src/map.jl 100.00% <100.00%> (ø)
src/stackedviews.jl 78.37% <100.00%> (ø)

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 5b2202d...6f6b4ae. Read the comment docs.

@johnnychen94
Copy link
Member

johnnychen94 commented Apr 15, 2021

So far the test passes; it seems that this PR is ready but @timholy I'll leave it to you to decide whether it's okay to merge.

To make CI happy, I've restored the version number back to 0.8.22, so we'll need to bump it again to 0.9.0 after merging this PR.

Copy link
Member

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After separating some of the codes into separated PRs, the changes now look good and safe to me. I'll for a few days and merge this.

src/ImageCore.jl Outdated Show resolved Hide resolved
@johnnychen94 johnnychen94 changed the title Update dependencies, reduce latency (ImageCore 0.9) upgrade to ColorVectorSpace and reduce latency (ImageCore 0.9) Apr 21, 2021
@johnnychen94 johnnychen94 changed the title upgrade to ColorVectorSpace and reduce latency (ImageCore 0.9) upgrade to ColorVectorSpace 0.9 and reduce latency (ImageCore 0.9) Apr 21, 2021
@johnnychen94 johnnychen94 changed the title upgrade to ColorVectorSpace 0.9 and reduce latency (ImageCore 0.9) upgrade to ColorVectorSpace 0.9 and reduce latency Apr 21, 2021
@johnnychen94 johnnychen94 merged commit f341eb6 into master Apr 21, 2021
@johnnychen94 johnnychen94 deleted the teh/latency branch April 21, 2021 13:29
@timholy
Copy link
Member Author

timholy commented Jul 18, 2021

Thanks for merging this!

@johnnychen94
Copy link
Member

welcome back 😄

@timholy
Copy link
Member Author

timholy commented Jul 20, 2021

Thanks! It's nice to be back. My immediate goal is to get my JuliaCon stuff ready but after that I should slowly catch up. There are something like 8k "non-triagable" notifications so it may take a bit of time.

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.

3 participants