silx
silx copied to clipboard
[profile] Diagonal profile on large stack of image can be slow
When drawing a profile on a large stack of images (I tested with 1k^3), the diagonal line drawing interaction becomes really slow. It would be better if the line remains drawn interactively even if the image profile is not updated at the same rate..
Is there a risk of having a displayed profile not corresponding to the drawn line? Current behavior is slow but safe in the sense of what you see is what you get.
Yes if the slice is rendered asynchronously, we need some way to let the user know when the displayed image actually corresponds to the drawn profile line and when it is out-dated.
This seems to came from the commit eb485717e7e5345c1941c2770494d3981065a487. Indeed if we use PyQt4 + matplotlib on the latest version the is no slow anymore but slow down appears if using PyQt5 instead.
Behavior is the same for PyQt4 + opengl and PyQt5 + opengl
That's going to be fun... Is it the same version of matplotlib between PyQt4 and PyQt5?
Work with python3 + PySide2
Yes same version of matplotlib. But the behavior is the same with openGL.
works with PyQt5 5.10.0 + python3.5 fails with PyQt5 5.3.2 + python 2.7
Hope this is fixed for latest PyQt5 version
BTW, it looks there is 2 issues discussed here:
- Profile on large stack (e.g., 1k**3) which to my knowledge has always been slow (and would need so asynchronous refresh).
- Profile on small stack which is slow depending on PyQt version...
Should be tested, but with the new profile, the computation is done in a thread pool. So it maybe mitigate this problem.