-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Slow trisurf #593
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
Comments
it looks like it this is because of the Looping through a list of triplets and individually multiplying each number by a scalar is a really inefficient way of doing this, and makes the code unusable for any decent-sized amount of data. |
Hey @choldgraf I'm happy to review and merge if you want to make a quick PR. Thanks for the heads-up on this |
I can make a quick PR on this one, but to be honest I'm a little hesitant to do this, since I spent a while improving the |
Oh, yikes, sorry about that! Would the PR be essentially the same changes? If so we can look at those commits and try to cherrypick them back. I don't remember why that work was undone, I'll try to be more vigilant this time around! |
No, I think there was some refactoring that happened, but as a part of the refactoring it reverted to the old way of doing the multiplication. IIRC we had a back and forth on another PR and some folks seemed like they were trying to minimize the use of numpy to reduce dependencies. IMO I think Numpy should be treated as a core part of Python in this field, so I don't see it as a dependency, but some folks disagree and I think that's why the current state of code isn't vectorized w/ numpy (and thus takes like 10 times longer) |
Yeah, I definitely agree on the core use of numpy.
Can we try to bring this fix back? |
maybe I will have some time to work on this over the weekend or next week, already...On Fri, Oct 28, 2016 at 4:01 PM Jack Parmer [email protected]
|
@choldgraf ugh. Sorry this happened. I wonder if there is a way we could add some tests to keep this locked down? It seems like not having If you are willing to make the changes to get this code running again, I can make sure to benchmark this in some way to prevent future regressions. |
I can spend some time to re-implement these changes, though it may be a little bit of time as I've got a few other time-sensitive projects going on right now. IMO, In the longer term, I think it's only worth making these updates if there's a more general shift towards using numpy within plotly. If people are constantly trying to think of how to do vector-style operations without numpy, it's just going to make code unnecessarily complicated and slow. So I can fix this issue eventually (though note that it's a 2-part issue actually, as the |
I'm fine with making this shift. The original reason for not having it was to decrease the barrier to entry for new users. However, if it's at the cost of increasing the barrier to more real-world use, the choice is pretty obvious to just include it. As far as the |
@choldgraf thanks again for all the help here. It's really appreciated. I think I'm going to be switching off of some other Plotly work to focus on this api library in a couple weeks. I'll open up a milestone when that happens and maybe you can chime in on some requests for improvements that you'd like to see! |
Yes, will do. And to add to the discussion above, I think I'm the one responsible for the reverting to the non-vectorized computations. I think they are still in Regardless, I should take this on as well. I don't think it will take too long as I'm quite familiar with the code. Sounds good? |
Sounds excellent! Thanks @Kully! @choldgraf if we can get a PR up soon, can we ping you to give it a whirl and see if it meets performance expectations? |
changed the title to reflect that the iplot issue is resolved in the newest python version (pip) |
Based on the timeline of things it looks like #570 addressed the performance regressions reported here. Feel free to re-open, or open a new issue, if there are remaining loose ends from this discussion. |
Two quick things:
create_trisurf
code has changed, and now the code takes an order of magnitude longer to run. (now at about 45 seconds when it used to take 3-4 seconds). I'm not sure if somebody un-did the optimizations that I added a few months back, or if something new has been added that's slow, but just FYI.iplot
function for offline plotting. E.g.:The text was updated successfully, but these errors were encountered: