-
Notifications
You must be signed in to change notification settings - Fork 23
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
Out of memory after intersects(s1, s2) #206
Comments
Note: There is a difference os memory usage of: for i = 1:100000
LibGEOS.intersects(shape1, shape2)
end and for i = 1:100000
LibGEOS.intersects(shape2, shape1)
end |
What's the average number of vertices for your shapes? Have you tried other geometry libraries like ArchGDAL.jl? |
Hi @asinghvi17 ,
No I didn't know ArchGDAL, I'll try now. |
Hello @asinghvi17 , I tried use ArchGDAL.jl and memory remains stable. My code was: shape1n = ArchGDAL.createmultipolygon(GeoInterface.coordinates(shape1))
shape2n = ArchGDAL.createmultipolygon(GeoInterface.coordinates(shape2))
for i = 1:100000
ArchGDAL.intersects(shape1n, shape2n)
end and it runned very stable. |
Great! In this case, you should use Looks like there is a memory leak in the Julia wrapper of LibGEOS (this package), since ArchGDAL depends on the underlying C library GEOS. |
Relates to #184 |
Hello,
First of all, congrats for your work. It's owesome!
I'm working with your module, and need check 100 thousands of intersections.
After doing my loop, my memory is empty, it's about 32 GB. Although the shapes are small.
Here a sample of my code that the problem can be observed:
I observed that the problem happends even when I check the intersection of two small shapes many times.
I don't know why the problem happens, but I suspect of some global data. Inspecting the code at: https://github.com/JuliaGeo/LibGEOS.jl/blob/master/src/geos_functions.jl, I saw the
context
variable that could be linked at shape, that is a global variable at my code, because it is at a dataframe (Dataframes.jl), I read like this:If it's the problem, how could I clear this context? If it isn't the problem, how can I check the interssection without lack of memory?
The text was updated successfully, but these errors were encountered: