Skip to content

appDisplay: Reduce g_app_info_get_all() calls

Carlos Garnacho requested to merge wip/carlosg/less-get-all-calls into master

Whenever the AllView needs (re)populating, we used to do one general g_app_info_get_all() to get all GAppInfo, plus one per app folder in order to check the ones that fall within that category. This calls results in a fair amount of I/O blocking the main loop.

In order to ease this, keep the GAppInfo list around in AllView, and make the AppFolders use it when figuring out the contained apps. Since reloading the AllView results in AppFolders regenerated from scratch, the app info list is ensured to be up-to-date for any later change within the AppFolder (eg. through the GSettings key changing).

As the list was already filtered in the first place, we can also remove the try{}catch() in AppFolder in order to discard desktop files with invalid encoding.

Related: #832

Merge request reports