Bug 305571

Summary: Slower speed of "software management"
Product: [openSUSE] openSUSE 10.3 Reporter: Rastislav Krupansky <rastislav.krupansky>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Stanislav Visnovsky <visnov>
Severity: Normal    
Priority: P5 - None CC: benji, dmacvicar, kkaempf, ma, opensuse, schubi
Version: Beta 2   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Rastislav Krupansky 2007-08-28 19:32:50 UTC
Hello.
I have experience that speed of "software management" of YaST isn't faster than openSUSE10.2. It is slower even.
I have added 3 repos. Inst-source, inst-source-debug and inst-source-extra. So i compared time 10.2 and 10.3. For example.
When i start it, a window "checking dependency" is shown longer, in my case around 2 seconds. A window isn´t shown at all in opensuse 10.2.
When i search for any package, searching takes much more time than in openSUSE 10.2. Beta2 about 2 seconds and more. It depends on package. Result is shown almost immediately in openSUSE 10.2.
When i switch among repositories, it also takes a longer time. Beta2 takes about 1 s. and depends which one repo is selected. The biggest repo inst-source takes approximately 3 seconds. Repos are changed immediately in openSUSE 10.2 and the bigest repo inst-source takes only approx. 0,5 s.
When any package is installed successfully, switching back to main window takes a long time also, about 2s in Beta2 and it seems like frozen. openSUSE 10.2 is smoothly.
Starting of "software management" of 10.3 takes approx. 30 s. and openSUSE 10.2 also.
Speed of zypper in command line is really fast.
openSUSE 10.3

time zypper se kde

real    0m2.968s
user    0m2.460s
sys     0m0.156s

openSUSE 10.2

time zypper se kde

real    0m32.818s
user    0m24.762s
sys     0m1.352s

My CPU is Athlon XP 2500+ (it´s about 1.8GHz) and i had even increased RAM from 768MB to 1.2GB before i installed Beta2.

By the way, similar experience from another user in discussion under article on http://news.opensuse.org/?p=153
quote
"About speed: my experience is, that it got faster of fast machine (2Ghz+dualcore), about the same on a single core 2.4Ghz P4, and a lot slower on anything below."

Regards
Comment 1 Benjamin Weber 2007-08-28 19:40:38 UTC
Are you using KDE or GNOME? It is relevant as there is a different GTK frontend to YaST in 10.3 and the search in the package selector there is particularly slow. 

If you're using KDE and have the Qt package selector you can disable the "Checking dependencies" popup by unchecking the autocheck dependencies button.
Comment 2 Rastislav Krupansky 2007-08-28 20:00:42 UTC
I use KDE.
Will it solve all problems with speed if i disable the "chcecking dependecies"?
I don't know, i don't think so.It's making me crazy:-)


Comment 3 Rastislav Krupansky 2007-08-28 20:10:33 UTC
I disabled autocheck and searching is faster, that's true. But that's all:-(
Comment 4 Klaus Kämpf 2007-08-29 07:57:22 UTC
Huh, disabling auto-dependency-checking makes search faster ?

Its hard to believe that both are related. Stefan ?
Comment 5 Rastislav Krupansky 2007-08-29 09:42:12 UTC
Please accept my aplogize, but my mistake.It isn't faster.I'm trying it now, but it is the same.
Sorry,i'm wrong.:-)
Comment 6 Stefan Hundhammer 2007-08-29 09:53:00 UTC
OK. For a moment you had me wondering if something is terribly wrong there. ;-)

Please reopen if the problem reappears.
Comment 7 Rastislav Krupansky 2007-08-29 10:15:49 UTC
Uf.I don´t know why you have chosen status INVALID.I mean my apologize about comment #3 only.
Comment 8 Stefan Hundhammer 2007-08-29 11:34:14 UTC
Sorry, then I misunderstood you.

Could you please summarize what is (or feels) slower now, preferably even under which circumstances?
Comment 9 Stefan Hundhammer 2007-08-29 11:36:03 UTC
About searching for packages:

Does it make a difference if searching in package descriptions (rather than just name and summary) is checked?
Comment 10 Rastislav Krupansky 2007-08-29 11:50:17 UTC
Yes, we didn´t understand correctly:-)
I meant autocheck only in my comment #5.Disabling autocheck has no effect on speed of searching.
All, what i wrote in description is slower.
Problem is still in progress.
Comment 11 Stefan Hundhammer 2007-08-29 17:04:56 UTC
Exactly what could the UI do here, considering that no code was changed at all anywhere near those search functions? It's all the same as it was in 10.2. Or in 10.1, for that matter.
Comment 15 Stefan Hundhammer 2007-08-30 12:09:31 UTC
The first search is indeed slower, yes. That's the price we are paying for delayed initialization of all kinds of things. The time saved during start-up is now spent while data are actually accessed. Subsequent queries are as quick as they always were.

So, what do the libzypp maintainers suggest? Do we have a query API that will give quicker results while maintaining the existing (UI) feature set?

Right now, the UI does everything (because no underlying layer offered anything that even came close): It iterates over all selectables in the pool and checks each selectable against the user's query.

By default, name and summary are queried. But the user can also select to query in descriptions, in RPM "provides" and in RPM "requires". 

Search modes are "contains", "starts with", "matches exactly", "matches regexp", "matches wildcard". Case sensitivity can be toggled on and off for every search mode.

Which libzypp call (if any) can cover that?
Comment 16 Stefan Hundhammer 2007-08-30 12:12:56 UTC
(In reply to comment #3 from Rastislav Krupanský)
> I disabled autocheck and searching is faster, that's true. But that's all:-(

Come to think of it, I can understand how you came to this impression: The first search was slow (because the data weren't loaded completely yet). Then you tried what to do to make it faster. You tried to change "auto check". And the next search was indeed quicker than the first -- which OTOH it always is, regardless of "auto check".

It's really not your fault that you came to this conclusion. 

Comment 17 Klaus Kämpf 2007-08-30 12:35:20 UTC
Michael is the technical expert here.
Comment 18 Michael Andres 2007-08-30 14:45:54 UTC
AFAIK Klaus and Jano implemented a nice ZyppSearch, that could be used to speedup and improve certain queries. 

Unfortunately all this was done in zypper, so we can't offer it to the UI's until it is ported into libzypp.
Comment 19 Klaus Kämpf 2007-08-30 14:53:52 UTC
Thats scheduled for post-10.3

The question here is if (numbers please!) and why search through the UI is slower.
Comment 20 Rastislav Krupansky 2007-08-30 14:56:44 UTC
If i can suggest something, if you think time saved durnig launch of a
"software management"(in comment #15), i've compared time of launch in Beta2
and in 10.2 with three identical repositaires turned on. It takes about 30
seconds in both versions (as i wrote in "Description"), so i can't see any
saved time there.
Comment 21 Duncan Mac-Vicar 2007-08-30 14:59:40 UTC
Comment #19: because it is an iteraton of the pool comparing again package
descriptions, each one is retrieved from disk on demand.
Comment 22 Stanislav Visnovsky 2007-08-30 15:00:47 UTC
(In reply to comment #20 from Rastislav Krupanský)
> If i can suggest something, if you think time saved durnig launch of a
> "software management"(in comment #15), i've compared time of launch in Beta2
> and in 10.2 with three identical repositaires turned on. It takes about 30
> seconds in both versions (as i wrote in "Description"), so i can't see any
> saved time there.

Were the repos refreshed already?
Comment 23 Stefan Hundhammer 2007-08-30 15:05:15 UTC
For me, startup time is considerably faster on 10.3 than on 10.2.
Comment 24 Klaus Kämpf 2007-08-30 15:09:25 UTC
Stefan, please put some numbers behind your statement

- number of subscribed repositories
- stopwatch timing

preferably for 10.2 and 10.3

Rastislav, it would be nice if you could do the same.
Comment 25 Stefan Hundhammer 2007-08-30 15:24:46 UTC
Active repositories:

ftp://dist.suse.de/install/SLP/openSUSE-10.3-Alpha7-DVD/i386/DVD1
ftp://ftp.suse.com/pub/suse/update/10.3

Disabled repository:

ftp://ftp.suse.com/pub/suse/update/10.2/

15 seconds start-up time for "yast2 sw_single" until I can type into the "Search" field.

Hardware:

Intel P4 2.6 GHz with Hyperthreading
1.5 GB RAM

First search for "yast2": ~2.5 sec
Search for "kdirstat" (to clean the result list): ~1 sec
Second search for "yast2": ~1 sec (maybe 1.3)
Search for "Firefox": ~1 sec

Now checking "search in descriptions" 
and the search for "Beagle": ~3.6 sec

The timings are really too short to be precise with stop-watch technique. But then, this shows that it's not so bad actually.




Comment 26 Rastislav Krupansky 2007-08-30 15:48:47 UTC
(In reply to Comment #22 From Stanislav Visnovsky)
Stano, i enabled these repos and refreshing is disbled.Should i try to refresh them?Would it have any effect on speed?

(In reply to Comment #24 From Klaus Kämpf)
I have enabled similar repos, just to be sure.
Active repositories for Beta2
http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory/inst-source/
http://ftp.gwdg.de/pub/opensuse/distribution/SL-OSS-factory-debug/inst-source-debug/
http://ftp.gwdg.de/pub/opensuse/distribution/SL-Factory-non-oss/inst-source-extra/

Active repos for 10.2
http://ftp5.gwdg.de/pub/opensuse/distribution/10.2/repo/oss/
http://ftp5.gwdg.de/pub/opensuse/distribution/10.2/repo/debug/
http://ftp5.gwdg.de/pub/opensuse/distribution/10.2/repo/non-oss/

I wrote about startup, it takes aprox. 30 sec. on Beta2 and 30 sec. on 10.2 also.
Comment 27 Rastislav Krupansky 2007-09-07 18:05:05 UTC
I'm on Beta3.
Startup is faster now.It takes approx 20 sec.until i can type into the
"Search" field.a good work :-)
But searching, switching among repositories, switching back to main window after installation ... is still the same.
Comment 28 Stefan Hundhammer 2007-09-10 09:32:42 UTC
(In reply to comment #27 from Rastislav Krupanský)
> But searching, switching among repositories, switching back to main window
> after installation ... is still the same.

That is to be expected: Changing repositories invalidates the cache (at least, part of the cache).
Comment 29 Rastislav Krupansky 2007-09-24 09:08:42 UTC
I´m on RC1 and nothing changed.still the same.
Comment 30 Stefan Hundhammer 2007-10-11 13:18:48 UTC
*** Bug 332059 has been marked as a duplicate of this bug. ***
Comment 31 Rastislav Krupansky 2008-03-25 20:36:48 UTC
This bug can be closed.I'm on Aplha3 and zypper and software management of YaST is incredibly fast.
Exactly, how it was expected.Great:-)
Comment 32 Duncan Mac-Vicar 2008-03-26 10:10:28 UTC
Yes