jmr wrote:
Himm - when I am doing searches in the CLI the timings are the same as
the GUI on first invocation, but on second for the CLI much faster. Is
the CLI caching the results somehow? Comparing the code in the CLI and
GUI we are doing exactly the same Query. The CLI did also timeout for
me on opensolaris.org on a few occasions.
The CLI does no caching, so I can't explain why it's much faster while
the GUI is not. One possibility is that a large portion of the cli's
search time is spent simply starting the program and loading the python
modules off disk. Because of zfs caching, that process goes much faster
the second time it's started.
Brock
I am looking at displaying the results as I get them and have the
bones of something working, but needs some polish. I'll post a webrev
when I'm happy as a first cut at least so you can take a look.
JR
$ pkg publisher
PUBLISHER TYPE STATUS URI
opensolaris.org (preferred) origin online
http://pkg.opensolaris.org/release/
contrib origin online
http://pkg.opensolaris.org/contrib/
~/work/ips_gate/src$ time python ./client.py search -s
"http://pkg.opensolaris.org/contrib/" "<python>"
Query: Args: <python> : cs: False : retact: True : Servers:
[{'origin': 'http://pkg.opensolaris.org/contrib/'}]
PACKAGE
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
real 0m5.018s
user 0m0.201s
sys 0m0.077s
~/work/ips_gate/src$ time python ./client.py search -s
"http://pkg.opensolaris.org/contrib/" "<python>"
Query: Args: <python> : cs: False : retact: True : Servers:
[{'origin': 'http://pkg.opensolaris.org/contrib/'}]
PACKAGE
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
pkg:/[email protected] (contrib)
real 0m1.419s
user 0m0.199s
sys 0m0.072s
Running PM with debug = True:
~/work/ips_gate/src$ pfexec python ./packagemanager.py
Search: pargs ['<python>'] servers: [{'origin':
'http://pkg.opensolaris.org/contrib'}]
Search Args: <python> : cs: False : retact: True
Result Name: Cheetah (contrib)
Result Name: Cython (contrib)
Result Name: django-compress (contrib)
Result Name: django-dbtemplates (contrib)
Result Name: django-dpaste (contrib)
Result Name: django-pagination (contrib)
Result Name: epydoc (contrib)
Result Name: fnorb (contrib)
Result Name: jaxml (contrib)
Result Name: modules (contrib)
Result Name: python-django (contrib)
Result Name: python-dns (contrib)
Result Name: python-irclib (contrib)
Result Name: python-pysqlite2 (contrib)
Result Name: routes (contrib)
Result Name: sqlalchemy (contrib)
Result Name: sqlobject (contrib)
Result Name: virtkey (contrib)
Result Name: xmldiff (contrib)
Number of search results: 19
Search time: 4 (sec)
Search: pargs ['<python>'] servers: [{'origin':
'http://pkg.opensolaris.org/contrib'}]
Search Args: <python> : cs: False : retact: True
Result Name: Cheetah (contrib)
Result Name: Cython (contrib)
Result Name: django-compress (contrib)
Result Name: django-dbtemplates (contrib)
Result Name: django-dpaste (contrib)
Result Name: django-pagination (contrib)
Result Name: epydoc (contrib)
Result Name: fnorb (contrib)
Result Name: jaxml (contrib)
Result Name: modules (contrib)
Result Name: python-django (contrib)
Result Name: python-dns (contrib)
Result Name: python-irclib (contrib)
Result Name: python-pysqlite2 (contrib)
Result Name: routes (contrib)
Result Name: sqlalchemy (contrib)
Result Name: sqlobject (contrib)
Result Name: virtkey (contrib)
Result Name: xmldiff (contrib)
Number of search results: 19
Search time: 6 (sec)
Search: pargs ['<python>'] servers: [{'origin':
'http://pkg.opensolaris.org/contrib'}]
Search Args: <python> : cs: False : retact: True
Result Name: Cheetah (contrib)
Result Name: Cython (contrib)
Result Name: django-compress (contrib)
Result Name: django-dbtemplates (contrib)
Result Name: django-dpaste (contrib)
Result Name: django-pagination (contrib)
Result Name: epydoc (contrib)
Result Name: fnorb (contrib)
Result Name: jaxml (contrib)
Result Name: modules (contrib)
Result Name: python-django (contrib)
Result Name: python-dns (contrib)
Result Name: python-irclib (contrib)
Result Name: python-pysqlite2 (contrib)
Result Name: routes (contrib)
Result Name: sqlalchemy (contrib)
Result Name: sqlobject (contrib)
Result Name: virtkey (contrib)
Result Name: xmldiff (contrib)
Number of search results: 19
Search time: 4 (sec)
Search: pargs ['<python>'] servers: [{'origin':
'http://pkg.opensolaris.org/contrib'}]
Search Args: <python> : cs: False : retact: True
Result Name: Cheetah (contrib)
Result Name: Cython (contrib)
Result Name: django-compress (contrib)
Result Name: django-dbtemplates (contrib)
Result Name: django-dpaste (contrib)
Result Name: django-pagination (contrib)
Result Name: epydoc (contrib)
Result Name: fnorb (contrib)
Result Name: jaxml (contrib)
Result Name: modules (contrib)
Result Name: python-django (contrib)
Result Name: python-dns (contrib)
Result Name: python-irclib (contrib)
Result Name: python-pysqlite2 (contrib)
Result Name: routes (contrib)
Result Name: sqlalchemy (contrib)
Result Name: sqlobject (contrib)
Result Name: virtkey (contrib)
Result Name: xmldiff (contrib)
Number of search results: 19
Search time: 5 (sec)
John Rice wrote:
Thanks Joanie - seems to be an issue with how the GUI is using the
search API we will look into it tomorrow. Also on the usability front
there is a bug to make the GUI return results progressively as the
CLI does. We will look into that as well.
JR
Joanmarie Diggs wrote:
On Tue, 2009-06-30 at 10:29 -0700, Brock Pytlik wrote:
Joanmarie Diggs wrote:
On Tue, 2009-06-30 at 09:48 -0700, Brock Pytlik wrote:
To help determine where the problem lies, could you please try
'pkg search gnome' and 'pkg search python' from the command line
and see what happens?
Thanks,
Brock
I'm doing 'pkg search gnome' at the moment. It's still cranking
away --
my timeout is now set to 300. :-) BUT, pkg is displaying things and
started doing so almost immediately. For what it's worth, as an
end-user, the experience with the command line feels better: At
least I
know it's doing *something*. With the current gui implementation, the
results list is blank for an awfully long time -- and comes up empty
without an extremely long timeout. Perhaps packagemanager could
display
results along the way?
Given the timeout issue, would it make sense to add an option to the
packagemanager Preferences dialog through which users could
increase the
value of PKG_CLIENT_TIMEOUT?
The other thing I'm wondering is if you all could be persuaded to
re-enable offline/local searching in packagemanager. Perhaps not by
default -- maybe it could be a setting in Preferences? Or perhaps
in the
instance of a timeout, search could fall back on a local search??
At the risk of sounding nonconstructive, which I really don't want to
sound, packagemanager search used to be a useful tool to me. It's
feeling far less so with these recent changes. (Sorry!)
Thanks for the explanations and help! Take care.
--joanie
I'll admit I'm confused about why changing the timeout makes a
difference here.
That's my bad. I was confused. Sorry!
If you have a chance, could you put it back to its previous value
(or delete it from your environment) and try 'pkg search gnome'
I just confirmed PKG_CLIENT_TIMEOUT is not set. I also just confirmed
that packagemanager, launched from the same terminal is reliably timing
out after 30 seconds.
'pkg search gnome' launched from the same terminal is working as it was
before, namely displaying results as it goes and terminating without
any
error message.
and perhaps 'pkg search /usr/bin > /dev/null' on the command line
It has not timed out.
again? I'd like to figure out whether the timeout is happening
because of the search API or the packagemanager. Because the way
the api works (reading things from the server dynamically), in
general it shouldn't time out even when thousands of results are
coming back. Basically, whether or not you can reproduce the
timeout behavior on the command line will point to where we need to
fix the problem.
The timeout seems limited to the gui.
HTH.
--joanie
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss