On Jun 15, 2009, at 2:33 AM, Laszlo (Laca) Peter wrote: > > On Mon, 2009-06-15 at 01:39 -0500, Shawn Walker wrote: >> If it is calling "pkg info X", yes, that's probably going to be >> "slow". Yet another reason to use the Python API instead (yes, I >> know >> that's not currently an option). If you were using the Python api, >> you could get that answer in a few hundred milliseconds. > > The way it currently works, it only uses the legacy info, > using pkginfo. Just curious, how come the Python API is > so much faster? Is it just the time it takes for Python > to initialise and load all the required modules? >
It is primarily the package catalog data so that the cli can verify whether you have given it a valid package name. We'll be working on speeding this particular operation up even further, but even then, it would still be faster to use the API especially if you are checking the status of multiple packages as less information would be needed. Cheers, -- Shawn Walker
