DataLab-Platform / DataLab

Open-source Platform for Scientific and Technical Data Processing and Visualization
https://datalab-platform.com
BSD 3-Clause "New" or "Revised" License
43 stars 4 forks source link

Slow loading of even simple plots #68

Closed marcel-goldschen-ohm closed 5 months ago

marcel-goldschen-ohm commented 5 months ago

Describe the bug Any change in the selection of visible signals is VERY slow, taking ~1 sec just to update even a simple graph (e.g., example sinusoid with default parameters). During this delay the UI pops up one or even multiple brief progress dialogs and the whole UI essentially stalls and blinks which is visually disturbing.

To Reproduce Launch DataLab, load two example signals, then change which signal is selected.

Expected behavior The new signal selection should be nearly instantaneous (at least for the simple signals tested), and no progress dialogs or UI blinking should occur.

Installation information Installed via pip install cdl[qt] in a conda environment.

DataLab v0.15.0

Machine type: x86_64 Platform: macOS-12.7.4-x86_64-i386-64bit Python v3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:50:49) [Clang 16.0.6 ]

Unable to open dependencies hash file.

Package Version


cdl 0.15.0 certifi 2024.2.2 charset-normalizer 3.3.2 guidata 3.5.0 h5py 3.11.0 idna 3.7 imageio 2.34.1 lazy_loader 0.4 networkx 3.3 numpy 1.26.4 opencv-python-headless 4.9.0.80 packaging 24.0 pandas 2.2.2 pillow 10.3.0 pip 24.0 PlotPy 2.3.0 psutil 5.9.8 PyQt5 5.15.10 PyQt5-Qt5 5.15.13 PyQt5-sip 12.13.0 python-dateutil 2.9.0.post0 PythonQwt 0.12.1 pytz 2024.1 PyWavelets 1.6.0 QtPy 2.4.1 requests 2.31.0 scikit-image 0.23.2 scipy 1.13.0 setuptools 69.5.1 six 1.16.0 tifffile 2024.4.24 tomli 2.0.1 tzdata 2024.1 urllib3 2.2.1 wheel 0.43.0

PierreRaybaut commented 5 months ago

Hey @marcel-goldschen-ohm, thanks for the feedback.

Anything particular regarding the example signals? (high number of points?)

Is it slow only when changing selection or is it also slow when resizing the window, or zooming in/out (right-click on the canvas and hold it while moving mouse cursor)?

Would it be possible for you to capture the window?

Here is an example on Windows 11, with an average machine: (the video is in real-time, @ 60FPS) https://github.com/DataLab-Platform/DataLab/assets/1311787/f925fbe0-5917-42d3-9af5-374c8550c4e0

marcel-goldschen-ohm commented 5 months ago

Window resizing and zooming seem nominally ok although zooming does feel a tad choppy to me. Changing selected visible signals is the main issue. I sent you a video in another email just recently showing the issue when creating a new signal. The same thing happens whenever the selected signals are changed.

Marcel

From: Pierre Raybaut @.> Date: Thursday, May 2, 2024 at 10:23 AM To: DataLab-Platform/DataLab @.> Cc: Goldschen, Marcel @.>, Mention @.> Subject: Re: [DataLab-Platform/DataLab] Slow loading of even simple plots (Issue #68)

Hey @marcel-goldschen-ohmhttps://github.com/marcel-goldschen-ohm, thanks for the feedback.

Anything particular regarding the example signals? (high number of points?)

Is it slow only when changing selection or is it also slow when resizing the window, or zooming in/out (right-click on the canvas and hold it while moving mouse cursor)?

Would it be possible for you to capture the window?

Here is an example on Windows 11, with an average machine: (the video is in real-time, @60fpshttps://github.com/60fps) https://github.com/DataLab-Platform/DataLab/assets/1311787/f925fbe0-5917-42d3-9af5-374c8550c4e0

— Reply to this email directly, view it on GitHubhttps://github.com/DataLab-Platform/DataLab/issues/68#issuecomment-2090800072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYB6KXOEDYAOVNOMBARJ3LZAJK75AVCNFSM6AAAAABHD4IU5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQHAYDAMBXGI. You are receiving this because you were mentioned.Message ID: @.***>

PierreRaybaut commented 5 months ago

Thanks a lot. This certainly helps.

Regarding the video, I've only noticed the "Creating plot items" pop-up: image

It seems quite annoying indeed and the experience is clearly not the same on Windows and Linux. Maybe it's related to the way macOS is handling pop-up windows. Anyway, I think that it may be easily fixed.

Is there anything else apart from the pop-up window I should notice in the video?

marcel-goldschen-ohm commented 5 months ago

Other than the blinking of the UI (which may be a consequence of the pop-ups), that’s it. Hopefully the fix is simple 😊

Cheers, Marcel

From: Pierre Raybaut @.> Date: Thursday, May 2, 2024 at 11:48 AM To: DataLab-Platform/DataLab @.> Cc: Goldschen, Marcel @.>, Mention @.> Subject: Re: [DataLab-Platform/DataLab] Slow loading of even simple plots (Issue #68)

Thanks a lot. This certainly helps.

Regarding the video, I've only noticed the "Creating plot items" pop-up: image.png (view on web)https://github.com/DataLab-Platform/DataLab/assets/1311787/096c14de-7f04-4f2a-bc47-b5645901f284

It seems quite annoying indeed and the experience is clearly not the same on Windows and Linux. Maybe it's related to the way macOS is handling pop-up windows. Anyway, I think that it may be easily fixed.

Is there anything else apart from the pop-up window I should notice in the video?

— Reply to this email directly, view it on GitHubhttps://github.com/DataLab-Platform/DataLab/issues/68#issuecomment-2091044283, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYB6KXJNTORLDXWX4TNNHTZAJU5JAVCNFSM6AAAAABHD4IU5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGA2DIMRYGM. You are receiving this because you were mentioned.Message ID: @.***>

PierreRaybaut commented 5 months ago

Thanks again for taking the time to collect all this helpful feedback data. We'll take a look at it and release a patch asap.

PierreRaybaut commented 5 months ago

By the way, @marcel-goldschen-ohm , would be able to test an experimental branch? (I think that getting the right behavior for the progress dialog pop-up could be quite tricky and could require a few steps.)

marcel-goldschen-ohm commented 5 months ago

Sure.

From: Pierre Raybaut @.> Date: Thursday, May 2, 2024 at 2:56 PM To: DataLab-Platform/DataLab @.> Cc: Goldschen, Marcel @.>, Mention @.> Subject: Re: [DataLab-Platform/DataLab] Slow loading of even simple plots (Issue #68)

By the way, @marcel-goldschen-ohmhttps://github.com/marcel-goldschen-ohm , would be able to test an experimental branch? (I think that getting the right behavior for the progress dialog pop-up could be quite tricky and could require a few steps.)

— Reply to this email directly, view it on GitHubhttps://github.com/DataLab-Platform/DataLab/issues/68#issuecomment-2091445766, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABYB6KR47PDGG5EAP5ETUO3ZAKK47AVCNFSM6AAAAABHD4IU5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRGQ2DKNZWGY. You are receiving this because you were mentioned.Message ID: @.***>

PierreRaybaut commented 5 months ago

@marcel-goldschen-ohm : Could you test the develop branch?

The fa0f4744c07b38821110a27ea1a4deffe88c787f commit should be a good candidate for fixing this issue.

marcel-goldschen-ohm commented 5 months ago

This commit solved the issue for me. Thanks for such a fast solution!

PierreRaybaut commented 5 months ago

@marcel-goldschen-ohm : Thanks again for your help. Just released v0.15.1 which includes this fix.