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

Fix OutOfMemoryError in test #154

Merged
merged 1 commit into from
Sep 20, 2020
Merged

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Sep 20, 2020

Not entirely sure if the array indices were chosen to satisfy any specific condition, but if they weren't then tests need not create such large arrays.

Previously

julia> y = OffsetArray{Float64}(undef, -1:1, -7:7, -128:512, -5:5, -1:1, -3:3, -2:2, -1:1);

julia> Base.summarysize(y)/2^20 # size in MB
762.5423049926758

Now

julia> y = OffsetArray{Float64}(undef, -1:1, -7:7, -1:2, -5:5, -1:1, -3:3, -2:2, -1:1);

julia> Base.summarysize(y)/2^20
4.75860595703125

This was leading to occasional OutOfMemoryErrors while testing locally.

@codecov
Copy link

codecov bot commented Sep 20, 2020

Codecov Report

Merging #154 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #154   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files           2        2           
  Lines         251      251           
=======================================
  Hits          236      236           
  Misses         15       15           

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 8c07770...c723158. Read the comment docs.

@jishnub jishnub merged commit dc867d5 into JuliaArrays:master Sep 20, 2020
@jishnub jishnub deleted the testmemoryfix branch September 21, 2020 05:51
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.

1 participant