Bug 429260 - Very slow UI
Summary: Very slow UI
Status: RESOLVED FIXED
Alias: None
Product: Skanlite
Classification: Applications
Component: general (show other bugs)
Version: 2.2.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-17 17:36 UTC by Paul Jurczak
Modified: 2021-10-18 15:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE Gear 21.08.3 & KDE Gear 21.12
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Jurczak 2020-11-17 17:36:46 UTC
I just installed a fresh KDE neon, Skanlite 2.2.0.0 and nvidia-driver-455. I use a 1600x1200 display and UI of all other applications is pretty snappy. Skanlite on the other hand, takes about 3 seconds for a simple UI actions, e.g. selecting Scan resolution, both in landscape and portrait modes. I have a relatively modern, 4 core, 3.3GHz Intel i5 CPU, 8GB RAM and GeForce GT 730 GPU.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.20
(available in About System)
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 1 Kåre Särs 2020-11-17 20:40:00 UTC
Thanks for the report.

Are you by any chance using a Canon network scanner with the pixma backend?

I have one of those and that backend has a strange sleep, in the network communication, that freezes the UI thread :(
Comment 2 Paul Jurczak 2020-11-17 23:05:43 UTC
Yes, I'm using Canon MF232w, which gives me a lot of problems. I tried to make it work through USB, but that failed. It works through Ethernet, but the throughput is low. I don't know about pixma backend, I just installed `linux-UFRII-drv-v520-usen` driver from Canon.
Comment 3 Bug Janitor Service 2020-12-02 04:34:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Kåre Särs 2020-12-02 06:41:29 UTC
In my opinion this is a bug in the pixma backend, but I'm wondering a bit about if we should disable the polling of hardware buttons feature. The HW button polling works really bad on all the scanners I have tested with...
Comment 5 Chris 2021-01-16 09:28:18 UTC
Hi all. I am using the Canon MF237w, and am facing the same issue. When I open Skanlite, it gives me the option of connecting via the Pixma backend or the ESCL backend. The ESCL backend works flawlessly, but the Pixma backend is slow. If you have any patch that you would like me to test, just let me know.
Comment 6 cactus 2021-10-17 08:13:37 UTC
Hello all,

Skanlite is very very sloooow through LAN connection, it freezes approx. 1 minute at each UI change (changing a parameter through the UI like opening a scrolling menu, change tab...). Sometimes, it crashes completely.

Note that Skanlite works perfectly through USB. 

I can use Simple-Scan instead, which works perfectly with LAN connection, but I would prefer Skanlite because of its advanced functions.

I don't know what information or log you need to investigate, I keep this thread open in my browser to answer quite quickly.

My Hardware (even I don't think it is the cause) : Canon MG3650, connected on a Raspberry Pi, which works perfectly on all configurations (Linux & Windows), excepting Skanlite over LAN.

Thanks for your help ! ;)
Comment 7 Bug Janitor Service 2021-10-17 14:27:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/libksane/-/merge_requests/53
Comment 8 cactus 2021-10-17 15:53:40 UTC
(In reply to Bug Janitor Service from comment #7)
> A possibly relevant merge request was started @
> https://invent.kde.org/graphics/libksane/-/merge_requests/53

I disagree, pixma network backend works perfectly with simple-scan !
Comment 9 Kåre Särs 2021-10-17 16:33:03 UTC
Note: We are _not_ disabling the backend, just the one feature of polling of the read-only options (like detecting a button being pressed on the scanner). Since Simple-scan does not seem to support that feature, it does not get bitten by it's problems either. Once this feature is disabled the scanning should be fine again.

So basically we disable just that one feature that does not work. The new (sad) thing here is that this is the first time that we check what backend is in use, in stead of being generic.
Comment 10 cactus 2021-10-17 17:49:59 UTC
(In reply to Kåre Särs from comment #9)
> Note: We are _not_ disabling the backend, just the one feature of polling of
> the read-only options (like detecting a button being pressed on the
> scanner). Since Simple-scan does not seem to support that feature, it does
> not get bitten by it's problems either. Once this feature is disabled the
> scanning should be fine again.
> 
> So basically we disable just that one feature that does not work. The new
> (sad) thing here is that this is the first time that we check what backend
> is in use, in stead of being generic.

OK, I apologize, I didn't understand that way.
I hope it will solve the problem ! ;)
Thank you !
Comment 11 Kåre Särs 2021-10-18 15:06:11 UTC
Git commit 04cf0249370b42ac7f9146a67b6545e68cb2e723 by Kåre Särs.
Committed on 18/10/2021 at 14:29.
Pushed by sars into branch 'master'.

Naughty-list pixma network backend option polling

The Pixma network backend behaves badly. polling a value will result in
1 second sleeps for every poll. The problem has been reported, but no
easy/quick fix was available and the bug has been there for multiple
years. Since this destroys the usability of the backend totally, we
simply put the backend on the naughty list and disable the option
polling.

M  +20   -9    src/ksanecore_p.cpp
M  +1    -0    src/ksanecore_p.h

https://invent.kde.org/graphics/libksane/commit/04cf0249370b42ac7f9146a67b6545e68cb2e723
Comment 12 Kåre Särs 2021-10-18 15:19:23 UTC
Git commit 2bdbe999808a225f1cfa10f10a4fcf09e45444e4 by Kåre Särs.
Committed on 18/10/2021 at 15:17.
Pushed by sars into branch 'release/21.08'.

Naughty-list pixma network backend option polling

The Pixma network backend behaves badly. polling a value will result in
1 second sleeps for every poll. The problem has been reported, but no
easy/quick fix was available and the bug has been there for multiple
years. Since this destroys the usability of the backend totally, we
simply put the backend on the naughty list and disable the option
polling.

M  +20   -9    src/ksanecore_p.cpp
M  +1    -0    src/ksanecore_p.h

https://invent.kde.org/graphics/libksane/commit/2bdbe999808a225f1cfa10f10a4fcf09e45444e4