HaikuDepot : More Backend Communications Improvements

Operating Systems / Haiku - Andrew Lindesay [lindesay.co.nz] - 19 December 2017 19:56 EST

- 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.

3094fef308 HaikuDepot : More Backend Communications Improvements
src/apps/haikudepot/Jamfile | 3 +
src/apps/haikudepot/List.h | 92 ++++++
src/apps/haikudepot/model/LocalIconStore.cpp | 77 ++---
src/apps/haikudepot/model/LocalIconStore.h | 4 +-
src/apps/haikudepot/model/Logger.h | 2 -
src/apps/haikudepot/model/Model.cpp | 329 +++++++++------------
src/apps/haikudepot/model/Model.h | 72 +++--
src/apps/haikudepot/model/PackageInfo.cpp | 29 +-
src/apps/haikudepot/model/PackageInfo.h | 4 +-
.../haikudepot/server/AbstractServerProcess.cpp | 276 ++++++++++++++---
src/apps/haikudepot/server/AbstractServerProcess.h | 80 ++++-
.../haikudepot/server/PkgDataUpdateProcess.cpp | 266 ++++++++---------
src/apps/haikudepot/server/PkgDataUpdateProcess.h | 26 +-
.../server/RepositoryDataUpdateProcess.cpp | 198 +++++--------
.../server/RepositoryDataUpdateProcess.h | 19 +-
.../server/ServerIconExportUpdateProcess.cpp | 144 ++++++++-
.../server/ServerIconExportUpdateProcess.h | 25 +-
src/apps/haikudepot/server/ServerSettings.cpp | 44 +++
src/apps/haikudepot/server/ServerSettings.h | 10 +
.../server/dumpexportpkg/DumpExportPkg.cpp | 2 +-
.../server/dumpexportpkg/DumpExportPkg.h | 2 +-
.../server/dumpexportpkg/DumpExportPkgCategory.cpp | 2 +-
.../server/dumpexportpkg/DumpExportPkgCategory.h | 2 +-
.../dumpexportpkg/DumpExportPkgJsonListener.cpp | 325 ++++++++++----------
.../dumpexportpkg/DumpExportPkgJsonListener.h | 4 +-
.../dumpexportpkg/DumpExportPkgScreenshot.cpp | 2 +-
.../server/dumpexportpkg/DumpExportPkgScreenshot.h | 2 +-
.../server/dumpexportpkg/DumpExportPkgVersion.cpp | 2 +-
.../server/dumpexportpkg/DumpExportPkgVersion.h | 2 +-
.../dumpexportrepository/DumpExportRepository.cpp | 2 +-
.../dumpexportrepository/DumpExportRepository.h | 2 +-
.../DumpExportRepositoryJsonListener.cpp | 217 +++++++-------
.../DumpExportRepositoryJsonListener.h | 4 +-
.../DumpExportRepositorySource.cpp | 38 ++-
.../DumpExportRepositorySource.h | 8 +-
src/apps/haikudepot/tar/TarArchiveService.cpp | 8 +-
src/apps/haikudepot/tar/TarArchiveService.h | 4 +-
src/apps/haikudepot/ui/App.cpp | 46 ++-
src/apps/haikudepot/ui/MainWindow.cpp | 11 +-
src/apps/haikudepot/ui/MainWindow.h | 4 +
src/apps/haikudepot/util/StorageUtils.cpp | 55 ++--
src/apps/haikudepot/util/StorageUtils.h | 6 +-
.../haikudepot/util/ToFileUrlProtocolListener.cpp | 9 +
.../haikudepot/util/ToFileUrlProtocolListener.h | 3 +
.../DumpExportRepositoryJsonListenerTest.cpp | 6 +-
src/tests/apps/haikudepot/HaikuDepotTestAddon.cpp | 2 +
src/tests/apps/haikudepot/Jamfile | 22 +-
47 files changed, 1544 insertions(+), 948 deletions(-)

Upstream: cgit.haiku-os.org


  • Share