dCore Import Debian Packages to Mountable SCE extensions > dCore X86
Why does sce-update take so much time (even more than sce-import)?
Jason W:
Hi sm8ps,
I will look into the performance of sce-update when there are updates available, which I did not test in my last post. I am always looking for better performance. Thanks for your observations.
sm8ps:
Thanks for the follow-up, Jason! -- I was going to say: "why bother?" Though after re-considering the results, I do think it would be interesting to compare.
In my case, it seems that sce-update adds 150% of the time of sce-import for checking if it should upgrade or not. This does sound inefficient but only pertains to one single extension with updates indeed available. If no updates are available, it does save a lot of time, of course.
I do not really see how to compare your results to mine because the difference in performance is so striking in your case. For a one-to-one comparison, you could add or remove some extra repositories and compare sce-update to sce-import for one single extension.
I have not really understood the code, although I took a closer look at it. (My avatar says it all when it comes to my understanding of Awk.) So maybe there is no much more efficient way of finding out if an extension is due for an update or not. Still I do not really understand why the searching for an update should take more time (+150%) than the actual upgrade.
Cheers!
Jason W:
Hi sm8ps,
I don't have extra repos, but sce-import and sce-update use the same routines in parsing them. But I did test 'sce-import -n firefox', 'sce-update -n firefox' with no updates, and tweaked the resulting firefox.sce to trigger an update and used 'sce-update -n firefox' that caused an update. The results are below, and none of these required downloads:
--- Code: ---dCore-stretch:
firefox initial import:
real 1m 12.98s
user 0m 38.45s
sys 0m 12.56s
'sce-update -n firefox' full checking but with no re-import:
real 1m 32.82s
user 0m 14.15s
sys 0m 5.76s
'sce-update -n firefox' full checking with re-import:
real 2m 36.13s
user 0m 51.99s
sys 0m 17.67s
--- End code ---
I am seeing an expected time result in sce-update that triggers an import that is roughly equal to the times of the sce-update checking plus sce-import. I am running a machine with 6GB of RAM (~4GB recoginzed on dCore-stretch) and a 3 Ghz dual core.
sm8ps:
Thanks again for taking the time, Jason! Your results do look like the expected behavior and there is no real point in striking a debate. Doing so nevertheless is not for the sake of argument but because you said you were always looking for ways to increase performance. Unfortunately, my Bash- and Awk-foo is not so strong that I could simply understand the source code (see my avatar ...) so I can only formulate conjectures, unfortunately.
I would expect sce-update to be quicker in discovering if an extension can be updated. Because it is enough to discover any single package in the chain of dependencies that can be updated and there is no need for checking all of the packages. sce-import on the other hand does have to touch every single package and therefore should take considerably more time. The difference in performance may vary by the position of the first package that can be updated but on average it should be about 50%.
Judging from the results, it looks to me like sce-update does not only check if some single package can be updated but seems to to a full checking for all the upgradeable packages. I do not know how exactly your tweaking of firefox.sce worked but in my case of a base extension consisting of 300+ individual packages it almost certainly was not the last one to which triggered the upgrade. I would have expected sce-update to signal much quicker that an update has been found. In my case, however, the full process of checking for updates takes more time than the full of importing the extension anew.
It is acceptable for sce-update to take (at most) as much time as sce-import to determine that there is no update available if this query is so complex. However, it should be no more and, at best, much less. Does that make sense? As I said, I have not understood the programming logic involved in sce-update and my reasoning pure speculation. If I am going astray then I shall be just happy to learn so.
Cheers!
Jason W:
Hi sm8ps,
You make a point in that sce-update can simply trigger an update on the first found instance that requires an update on any possible package, startup scripts, or data.tar.gz. Rather than having to go through the full checking for updates in the SCE. I think most folks just want to know if an SCE needs updating, as any startup script, data.tar.gz, or .deb package can be a very important change but don't need to know why.
I will look into how it can be done, perhaps with a "-f" "full check" option for sce-update for those who want a full checking and output.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version