History log of /haiku/src/apps/haikudepot/util/StorageUtils.cpp
Revision Date Author Comments
# 88af15cf 18-Dec-2023 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot : Refactor Screenshots

Rework the way in which the application deals
with screenshots so that there is a repository
of screenshots that is referenced from
identifiers on the package model and not that
the screenshot bitmaps are stored with the
model and not cleaned up.

Change-Id: I632def96852a518b3f6b1c8b81909de117bbbc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7296
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>


# 02ccdc6f 22-Feb-2021 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Drop Caches on Version Change

To avoid having to upgrade cache-data formats,
drop the caches when the application starts with
a different version from last time the
application launches.

Change-Id: I2f5b831b6a4fc570457bc633fd440a9021648b02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3749
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# f0e491d3 28-Jul-2020 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Icon / Tarball Handling

Instead of exploding the tar-ball of icons from
HDS, keep it as a tar-ball, index it and read
data directly out from specific indicies on demand.

This will speed up the process of downloading
the icons by removing the unpack. Also updates
will be faster by avoiding the need to delete the
old icon files.

Because icons are loaded on-demand, the start
time is faster by avoiding all the icon loads.
There are also savings on memory consumption.

Indexing on each load is surprisingly fast so
no external index is maintained. Likewise for
the tar-balls's meta-data.

This commit does not cover the implementation
of an LRU cache of the icons in memory.

Relates to #15370

Change-Id: Ia1647d8c805be89618f493d2592bf7877fca3f14
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3205
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# fa5c8097 25-Jul-2020 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Languages List

Abstacts the list of supported languages into
the LanguageModel class preventing use of
List. Also; fix a few cases where newer
logging techniques may have caused incorrect
logic flow.

Relates To #15534

Change-Id: I144fe4788abdaf0d93e53eeabc97b3f7aa2ec710
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3085
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# f96d1f4d 10-Jul-2020 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Better Logging

Changes the logging in HD to use a macro for the
various log levels to declutter the code and to
make it easier to more systematically log.

Change-Id: I025970707a0a11e7e3aaa4b52fc91288af0183f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3018
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 32ed7659 22-Mar-2020 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Check Working Files Writable

At start time, it is possible that the local disk
system is not able to be written to where the
application is trying to store working files. This
change introduces a check at startup that ensures
working files can be written to and warns the user
if this is not the case.

Change-Id: I907bf41a3b4eceb0083119a082fd5e68e4d534c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2397
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 3094fef3 19-Dec-2017 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot : More Backend Communications Improvements

* Further improves the logging and provides some
basic performance numbers.
* Moves the bulk-load logic out of the data-model
class.
* Introduces a state-machine for the bulk-load
process so that it will be more easily able to be
shifted to non-blocking IO when the HTTP libraries
can do that.
* Implements concurrent loading of the bulk-data to
hopefully improve lead time for icons and meta-data.
* Loads data to a temporary file and then moves to the
final location in order to avoid partially written
data in the cache.
* Handles situations where no network is available;
prevents attempt to access the network.
* Allows bulk-load processes to be cancelled when the
application quits.
* Introduces command-line arguments to help simulate
scenarios to help with testing performance and
network absence.
* Implements ordered insert and binary search in the
'List' class + basic unit test.


# 19c15fec 27-Jan-2017 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot: Improve icon download handling performance

Previously each icon would launch an independent HTTP request to
pull down the HVIF icon data. This change means that the data
will be pulled down in bulk across all packages as a .tgz and
will then be kept in a cache locally. The client-server logic
will use standard "If-Modified-Since" headers to check for
updates each time the HaikuDepot desktop application starts up.
This arrangement will bring down the HVIF as well as bitmap
icons and use the best representation it can.

Additionally, it is possible from a command-line option to log
HTTP traffic verbosely and it is also possible to use an "-h"
flag to display help on command-line arguments.

The code-structure around this change also anticipates some
future extensions to handle other client-server improvements.

Fixes #11804