This still won't help if there's one really huge file that takes
several seconds to write, but if there's a bunch of files together
that is less than a file_chunk_count but take more than a half-
second to write, update anyway
If there's thousands of files in a squashfs (e.g. 400000 like on
some ArcoLinux ISOs) then progress would be reported every
4000 files, which can take quite some time to write. Reduce
file_chunk_count to at most 500, so that progress is reported
more often even if that wouldn't lead to a visible change
in the percentage progress: instead we **do** get a change
in files-transferred numbers.
- The total weight is only needed by the UnpackOperation,
not by each entry.
- Use a chunk size of 107 so that the number-complete seems busy:
the whole larger-or-smaller chunk size doesn't really matter.
- The progress-report was missing the weight of the current
module, so would report way too low if weight > 1. This affects
ArcoLinux configurations where one entry is huge and one is a
single file, so weights 50 and 1 are appropriate.
When there are multiple entries, the overall weight of the
module is divided between the entries: currently each entry
takes an equal amount of space in the overall progress.
When there are multiple entries which take wildly different
amounts of time (e.g. a squash-fs and a single file) then
the progress overall looks weird: the squash-fs gets half
of this module's weight, and the single file does too.
With the new *weight* key for entries, that division can
be tweaked so that progress looks more "even".
- parameter instanceKey was left over from previous work that
special-cased the weight of Python modules.
- while here, consistently do `~T() override`
With 1 CPU, Calamares still spawns 9 threads or so: eventloop,
dbus loop, QML loop, ... many of those are invisible to the
application. Contention occurs on startup when the UI is constructed,
and we end up with the module manager creating widgets alongside,
or ahead of, the main window UI. This can result in deadlock:
- in CalamaresApplication::initViewSteps
- in QML imports
This is partly because the signal-slots connections get "deep":
from loadModules() we emit *modulesLoaded* which ends up showing
the main window in initViewSteps(). Avoid this with a QTimer:
drop back to the event loop and release whatever locks are held,
so the QML thread can get on with it already. Then the timer
goes off and the view steps are created.