Comments (4)
Hello @atsiflis!
We're happy the library has been useful to you :-)
I agree that it may seem like a memory leak. As far as I know (and remember), the evaluation of a spline should not result in any allocation of memory (that is not also freed before returning), except for the data structure to hold the result. However, the Python interface makes reasoning about this a bit harder, as it uses a garbage collector which may run at (seemingly) random times.
Ideally, the memory usage of this should converge to some constant:
while True:
y = bspline.eval(x)
I would have to have a more thorough look to determine if this is actually a memory leak, or if this is just Python playing us a trick.
Thank you for the report and the example, it will be very useful for debugging purposes!
from splinter.
I also meet the same problem.
My dataset is large,it will occupy all the memory of my computer, and report an error.
I still have a problem and do not know how to solve it. I use python, if I use for loop + splinter, its time cost is mainly in a large number of for loops, it will take more time than scipy( because scipy uses matrix processing), how to solve this problem, thanks
from splinter.
I can't solve this problem, but I think I can alleviate it.
The cinterface.h file contains a function SPLINTER_API void splinter_datatable_delete(splinter_obj_ptr datatable_ptr);
But this function is not used in codes, So in the datatable.py I add this function:
def __del__(self):
if self.__handle is not None:
splinter._call(splinter._get_handle().splinter_datatable_delete, self.__handle)
self.__handle = None
After that, still have a memory leak problem, but the leak speed is very slow.
Thanks
from splinter.
Hi, @yj-Roy. Good catch! I have not investigated this problem, but it seems reasonable to implement the del method for all the Python classes (not only DataTable) to prevent memory leakage. It would be great if you could prepare and submit a pull request so that we can fix the problem for all users.
Bjarne
from splinter.
Related Issues (20)
- Greater than bivariate B-splines HOT 4
- Faster bspline evaluation using vectors? HOT 3
- One bug in PSPLINE HOT 1
- What is the structure of the PyPI splinter package? HOT 1
- Number of spans in U and V direction in resulting surface HOT 1
- How to obtain libsplinter-4-0.dll in Win10 ? HOT 1
- P-Spline: determine the "best" smoothing parameter HOT 2
- Using library in c# code HOT 2
- Knot placement under knot multiplicity HOT 1
- How to plot the b_spline curve in x-y plane? HOT 1
- not-a-knot end conditions
- Protected constructor BSpline() results in error C2248 - cannot access protected member HOT 8
- Penalized B-spline dies while building HOT 7
- Very slow build of the bspline object HOT 20
- Automatic smoothing parameter selection HOT 3
- Run C++ sample code all night and can not return back result HOT 1
- In python spline.eval_jacobian(p) returns only the first column of the jacobian HOT 2
- Comparisons to some other standard spline packages? HOT 1
- C++ interface example outputs "double free or corruption (out)"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from splinter.