Skip to content
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

adjustText seems very slow with python3 #104

Open
apiddington opened this issue Aug 22, 2020 · 6 comments
Open

adjustText seems very slow with python3 #104

apiddington opened this issue Aug 22, 2020 · 6 comments

Comments

@apiddington
Copy link

Hi,
I have adjustText 0.6.1 installed using python2 on ubuntu 18.04. Running it with some 60 labels the response is almost instantaneous.
Version 0.7.3 on a virtual machine running python3 on ubuntu 20.04 the same plot takes 20.5 secs. On the same machine and v0.6.3 it is 3.9 secs. Version 0.8b2 is a similar time to 0.7.3.
I'm wondering why there is such a large increase in run time.
Regards

@Phlya
Copy link
Owner

Phlya commented Aug 22, 2020

Strange. Are the results actually the same everywhere?

@apiddington
Copy link
Author

I'm not sure what you mean by the 'same everywhere', but there is certainly a 5 fold time difference between v0.6.3 and v0.7.3 in exactly the same environment. I suppose I should do some more testing. I will try python2 on the virtual machine and compare.

@Phlya
Copy link
Owner

Phlya commented Aug 22, 2020

I mean the actual plots, do they look the same? Is it the same number of steps required?

@apiddington
Copy link
Author

I hadn't looked carefully, but no they are all a bit different. That is v0.6.1 with python2, v0.6.1 with python3, v0.6.3 python3, and v0.7.3 and python3. Not very different and all quite acceptable.

@apiddington
Copy link
Author

I have tried with python2, python3 with adjustText 0.6.1 and 0.7.3 on the same virtual environment on Ubuntu 18.04, and while there is a little increase in runtime it's not very significant. I'll see what happens when I update my desktop to Ubuntu 20.04.

I wasn't able to install all the required python2 modules on Ubuntu 20.04. Hence my upgrade to python3.

Hopefully it won't be the 20secs from the virtual environment.

Thanks for the response.
FYI here are my timings:

Python version: 2.7.17, adjustText version: 0.6.1, matplotlib version: 2.2.5
adjustText time: 2.9 secs
adjustText time: 1.3 secs
adjustText time: 0.0 secs
Total adjustText time: 4.2 secs

Python version: 3.6.9, adjustText version: 0.6.1, matplotlib version: 3.3.1
adjustText time: 3.5 secs
adjustText time: 1.4 secs
adjustText time: 0.1 secs
Total adjustText time: 4.9 secs

Python version: 2.7.17, adjustText version: 0.7.3, matplotlib version: 2.2.5
adjustText time: 1.9 secs
adjustText time: 3.1 secs
adjustText time: 0.1 secs
Total adjustText time: 5.1 secs

Python version: 3.6.9, adjustText version: 0.7.3, matplotlib version: 3.3.1
adjustText time: 2.7 secs
adjustText time: 3.5 secs
adjustText time: 0.1 secs
Total adjustText time: 6.2 secs

@Phlya
Copy link
Owner

Phlya commented Aug 23, 2020

So basically the difference is not that dramatic after all?

I wouldn't bother with python2, it's basically not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants