Bug 135975 - kjobviewer is unbelievable slow
Summary: kjobviewer is unbelievable slow
Status: RESOLVED NOT A BUG
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: kjobviewer (show other bugs)
Version: 0.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 18:47 UTC by Felix Möller
Modified: 2010-02-09 11:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Möller 2006-10-19 18:47:36 UTC
Version:           0.1 (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
OS:                Linux (i686) release 2.6.18.1-3-default

I am trying to use kjobviewer with a big print server.

# lpstat -h zivcups1.uni-muenster.de -o | wc -l
 807

# time lpstat -h zivcups1.uni-muenster.de -o
[...]
real    0m24.238s
user    0m0.156s
sys     0m0.192s

But something in kjobviewer seems to be broken, accessing this print server it locks the whole system. Trying to open a menu from the menubar takes a minute or so. Scrolling is impossible...

It is just unsable.
Comment 1 Felix Möller 2006-10-22 22:05:46 UTC
it is the same with:

# rpm -qf `which kprinter`
kdebase3-3.5.1-69.32
Comment 2 Michael Goffioul 2006-10-23 09:14:43 UTC
The job viewer is not really efficient when there's a lot of job items, this would need some optimization. The problem that you have is due to the internal refresh time-out of kjobviewer, which is too low in comparison to the time it takes to refresh itself. The default time-out is 5s. If kjobviewer takes more than 5s to refresh its GUI, it will starts a new refresh immediately. This usually eats all CPU.

One current workaround is to increase the refresh time, which is configurable from the KDEPrint Settings dialog (or kjobviewer dialog).
Comment 3 Kurt Pfeifle 2007-01-08 02:23:22 UTC
Which version of CUPS is this, Felix ?

And did Michael's suggestion help (increase the internal timeout value ?
Comment 4 Felix Möller 2007-01-08 16:24:26 UTC
Hi Kurt,

sorry I forgot about this bug. 

Michael's suggestion did not help. 

It happend with the current version of cups in opensuse-factory back then ...
I have seen this with SUSE 10.1 too and it is happening with FC3, which has cups-1.1.22-0.rc1.8.9 installed.
Comment 5 Kurt Pfeifle 2007-01-09 17:23:02 UTC
Felix, to what specific value had you set kjobviewer instead of its default 5 sec? Try a value that is bigger than what you need on the commandline with "lpstat". Try 30, 45, 60 and 90 seconds as well.

One other tweak that may speed it up: set the "Maximum number of jobs shown".

Do you really *need* all 807 (or more) jobs shown in CUPS' job history? You can limit that to whatever value you want by setting "MaxJobs" in cupsd.conf...

Also note, CUPS 1.1.x itself *is* slowing down (FC3) and doesn't scale very much for *very* large lists of jobs and printers. This is because all local CUPS communcation happens through an IP socket (loopback localhost:631).

CUPS 1.2.x is much faster for this kind of stuff (locally), because it sports and addition Unix domain socket for local communication between client programs and server parts.

However, I am currently not sure if KDE-3.5.5 is really adapted to full domain socket support (there were a few bug reports in the summer which indicated complete failure to even connect), or if we just disabled it and only use localhost:631 for now.

(I didn't have a Linux system for more than half a year, but I will test this now more closely over the next few days/weeks while I sift thru the bugs database...)
Comment 6 Felix Möller 2007-01-18 16:18:58 UTC
I had some time again today: 
I am just using the server zivcups1.uni-muenster.de i cannot change the configuation at all.

felix@vaio-gr214mp:~> lpstat -h zivcups1.uni-muenster.de -o | wc -l
97
felix@vaio-gr214mp:~> time lpstat -h zivcups1.uni-muenster.de -o  > /dev/null

real    0m5.299s
user    0m0.060s
sys     0m0.032s

My refresh time is set to 30s. But it is still not working.

I cannot limit the number of jobs with kjobviewer as it seems to work printerwise and on the converning server are 50 printers or so ...

I found a reproducable repainting problem: Having kjobviewer open and then opening and closing a dialog like "ipp-report". Does not cause a redraw of the window, it is just white. I have to click on the table and wait for 30 seconds too see the list again.

felix@vaio-gr214mp:~> rpm -qf `which kjobviewer`
kdebase3-3.5.5-78

zivcups1.uni-muenster.de runs with CUPS 1.1.14
locally I have cups-1.2.7-3.3
Comment 7 Felix Möller 2010-02-09 11:08:27 UTC
my University stopped supporting printing from Linux systems, therefore I cannot test this any longer. :-(