Repository navigation
Provide backward-compatible nxutils - #746
Conversation
…plemented in terms of the methods in _path.cpp. A "points_in_path" method has been added to support "nxutils.points_in_poly".
|
Note that pull #732 also addresses the lasso demo. Might want to merge in some of his changes as well? |
There was a problem hiding this comment.
Your warnings are backwards. The string comes first, then the deprecation.
|
So far, my tests have not revealed differences in results or (significant) differences in speed. I have a patch for some of the points I have made so far. I still think there is a memory leak somewhere. Possibly a missing DecRef somewhere. |
* Fixed usage error with deprecation warnings * Used deprecation directive in docstrings * Made point_in_path_impl more memory efficient
more nxutils fixes
|
Memory usage grows as I make many, many calls to points_in_poly() (a few thousand calls). I will make a test script to demonstrate. |
Conflicts: examples/event_handling/lasso_demo.py
|
Sorry for the obvious misses in Merged @pelson's |
|
No problem. That's what these checks are for. As for the memory leak, check out my gist: When I run it in v1.1.x, my memory usage is stable. When I run it in your branch (be sure to remove lib/nxutils.so), my memory usage keeps climbing a few megabytes per second. Don't worry too much about exactly what it does. It comes from a much more complicated polar to rect rasterizer that followed very special rules in certain cases. |
|
Is the memory leak still there with the fix in abb1dc9? |
|
Yes, the leak goes away with that fix. I haven't tested pnpoly, though. |
|
Is the fix in master already or another PR? |
|
The fix is in this PR. If it resolves issues for your nxutils-using code, I think this is probably good to go. |
|
ah, I missed it in the list. Ok, merging... |
Provide backward-compatible nxutils
nxutils was used in master because it is redundant to code in _path.cpp and to reduce the amount of code that needed to be ported to Python 3.x. A backward-compatible shim should be added so old nxutils-using code still works.