himselfv / wakan

Japanese and Chinese learning tool with dictionary
36 stars 7 forks source link

/fast command-line switch to skip some integrity checks #207

Closed himselfv closed 10 years ago

himselfv commented 10 years ago

Original report by me.

Originally reported on Google Code with ID 207

One of the longest steps when booting Wakan is checking database index integrity and
doing some auto-fixes. This cannot be dropped entirely because different versions had
somewhat different views on comparison procedure used for strings, and if you run those
on the same wakan.usr, they will need to rebuild indexes appropriately every time.

But most of the time the check is pointless, and so maybe a switch could be added.
Why a switch? Because it can easily be used in a shortcut you use to start Wakan in
daily life (from Start Menu or Taskbar), but you're still guaranteed to get integrity
checks from time to time when you run Wakan directly. And it's not like those are awfully
long either. I'm mostly trying to make bootup *feel* fast, because comparatively it's
already fast even with checks: less than a second.

If I make a configuration checkbox instead or make Wakan run without checks by default,
then no one will ever run checks after once disabling those. This is not good, because
even if the user has no older Wakans around, A. they can download and run older Wakan
at some point of time, corrupting Wakan.usr, and by that time they forget that they
disabled the check and don't know what to do, and B. new Wakan version may want to
fix some errors of this version in the same way, and if the user had already made the
decision to skip checks, what does new version do? Introduce new checkbox "skip additional
checks from version 2"?

It's better to simply leave it as required, and only give the option of "even faster
boot" to advanced users.

Still, even for advanced users if they have downloaded, or perhaps even auto-downloaded
new version, they will forget to run Wakan without flags once. I may have to think
of some way of storing the list of "fixes known and applied" in Wakan.usr. E.g. every
version will load the list and skip the checks which it found; at the shutdown it will
write the list of *all the checks it supports* (ignoring the originally loaded list).
This ensures that older versions will nullify the checks for the tests which were introduced
afterwards.

Reported by himselfv on 2013-10-29 12:53:52

himselfv commented 10 years ago
Done @r738.

Reported by himselfv on 2013-10-31 12:57:28

himselfv commented 10 years ago

Reported by himselfv on 2013-10-31 12:57:36