-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Performance issue with timeseries plotting on py3? #11831
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
this is the period index conversion, which IIRC you fixed? |
You are referring to #11194 I think. This fixed a perf regression before 0.17.0 was released (introduced between 0.16.2 and 0.17.0). Do you see a possible reason that this fix would not work on py3? |
Has this issue been fixed or are there workarounds? Are things moving on this issue? |
@rittmeister123 Not that I know (I haven't had time myself to dive into it). If you want to try to profile, to see where the slowdown is coming from, that would be very welcome! |
I'm new here (my first entry :) ), so please excuse possible format-issues or something else. @jorisvandenbossche I did some profiling with the example from above: My Setup for Python 3:
My Setup for Python 2:
The dataframe is generated with:
Timeit on python2:
Timeit on python3:
Attached you can find the Profiling files generated with
and
Please have a look at it, since i have no knowledge on profiling |
@rittmeister123 any luck with this? |
Unfortunately not! |
@jorisvandenbossche any thoughts on this? |
FYI: |
Did some quick profiling, and one of the elements is in any case the difference in performance of
vs
In turn, this boils down to calls to
vs
Now, what would cause the dramatic difference in performance in the @blbradley you did some work on the Period cython code. Do you have by any chance an idea where this peformance difference could be coming from? |
I think https://github.com/pydata/pandas/blob/master/pandas/src/period.pyx#L658 needs this instead of doing the string interpretation each time
also the import can be replace by as when There maybe something else going on in the actual |
I actually did a wrong timeit, as the
vs
which makes the difference even larger |
Strange, I don't see a difference in performance of python 3:
vs python 2:
|
try removing the import in |
I noticed a performance issue with plotting timeseries. After some trying with different environments (different pandas, matplotlib and python versions), it seems there is a problem on python 3 -> up to 10 x slowdown compared to python 2.7:
Python 2 and pandas 0.16.2 and 0.17.1:
With python 3, pandas 0.16.2 and 0.17.1:
The text was updated successfully, but these errors were encountered: