Tine subsurface updates

Lubomir I. Ivanov neolit123 at gmail.com
Wed May 2 23:51:01 PDT 2012


On 2 May 2012 20:35, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> I committed three small changes to subsurface today:
>
>  - it should now compile again with the latest libdivecomputer (yay!
> Another incompatible interface change in LD!)
>

i pulled from the official libdivecomputer repository and it seems to
compile fine on windows. there are a couple of small issues in their
configuration but nothing too specific. the output library and headers
are functional.

>   Hopefully, it also compiles with older libdivecomputer versions, I
> tried to make it auto-detect the latest interface change (that, btw,
> is not normally possible, so quite often we've had the situation that
> you need to have libdivecomputer match fairly closely in time with
> subsurface)
>
>  - I think it should now be safe to change the configuration multiple
> times on Windows.
>
>   I don't have a windows box to test on, much less a development
> environment. But when I was looking at writing config file updates
> (for the final change) I noticed that the windows case seemed unsafe:
> we closed (and never re-opened) the windows registry when changing
> defaults for units etc. So if you tried to do that twice, it looks
> like it would have failed the second time.
>

just tried making subsurface_flush_conf() a blank function and
everything seems ok, also changes are made multiple times without a
problem.

i think the persistent flushing would be needed more for much larger
configurations with multiple keys and logging or during large software
installation (e.g. something like GIMP). as far as i know in the
RegFlushKey API the actual key parameter is ignored and the entire
registry is scheduled for write to disk, for example on Windows 7 it
can be around 100mb, which could take some time depending if the
system is busy.

one problem of using the registry instead of configuration files is
usually fragmentation. while fragmentation on the disk usually has
better tools to deal with it, registry fragmentation has tools that
are less mature and is prone to more errors breaking the OS. also data
on disk can be reused by other files.

i think MS may eventually move away from the registry based model for
future OS and while there is a good ideas behind it (keeping
everything in the same place for instance), it's prone to bloat -
since a lot of software does not clear its keys after uninstall and
can be the cause for a rather quick OS failure due to use of cleaning
tools or incorrect user actions. :(

>  - I made subsurface remember your last choice in dive computer, and
> default to that for the next time you try to import something.
>

>   I got really tired of having to choose the same dive computer every
> time when I tried to import things many times due to a broken USB
> cable.
>
> Somebody should check my windows config changes.
>

hope that contributes in some way
lubomir


More information about the subsurface mailing list