Opened 5 years ago
Closed 3 years ago
#15879 closed bug (fixed)
HaikuDepot: Detecting and Reflecting System's Package Changes
Reported by: | apl-haiku | Owned by: | apl-haiku |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/HaikuDepot | Version: | R1/Development |
Keywords: | reload B_PACKAGE_UPDATE performance | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Each time a package was installed / uninstalled it is causing a re-load of all of the HaikuDepot application's data which is slow. This comes from an investigation on ticket #11674 and part of this description is transscribed from there.
This is happening because of a BMessage
sent from the Volume
class in the Package Server. It seems to be triggering when there is a change in the packages and the change is sent from the message Volume::_SetLatestState
. The code of the BMessage
is B_PACKAGE_UPDATE
.
Because when you install or uninstall a package, the B_PACKAGE_UPDATE
is sent. This message ends up being received in the HaikuDepot desktop application and it triggers the large-refresh of it's data by invoking the MainWindow::_StartBulkLoad
. I guess what happened is that this was fine in 2013 with a small number of packages but is slow now with a large number of packages.
I assume this is implemented like this so that when a change external to HaikuDepot happens (for example a command line package install) then the HaikuDepot application is able to react and reflect this change.
It would be good if the BMessage
could carry some information about what changed so that HaikuDepot were able to update the necessary data rather than loading everything again.
In the meantime this update mechanic will be disabled so that these excessive delays are not experienced by users of the HaikuDepot application.
See PR.