[PATCH 05/12] git repository reading: start reading the actual file contents

Dirk Hohndel dirk at hohndel.org
Sun Mar 9 20:10:47 PDT 2014

On Sun, 2014-03-09 at 18:43 -0700, Linus Torvalds wrote:
> From: Linus Torvalds <torvalds at linux-foundation.org>
> Date: Sat, 8 Mar 2014 13:11:50 -0800
> Subject: [PATCH 05/12] git repository reading: start reading the actual file contents
> If we want to scale to thousands of dives, we'll eventually want to read
> the dive computer files lazily when actually needed, but for now we do
> everything synchronously.  Even if that may actually be slower than
> parsing one big XML file.
> The git object store is pretty efficient, but especially with some
> history, the compression and delta application will certainly not be
> free.

Interesting question on the asynchronous loading of the dive computer

Things to consider are the issue of statistics / yearly statistics.

If we really wanted to load the dive computer files "on demand" that
would make an operation like 'ctrl-a' (to select all dives) unexpectedly

But then I thought... hey, we should just start a worker thread that
downloads the dive computers once the other data is loaded. Yes, if
someone starts Subsurface and immediately selects all dives or opens the
yearly statistics, things will come to a halt - but for 99% of the
"normal" use cases this would be a huge win.

The one thing to make sure of is that we first load all the dives (for
the dive list) and then load the dive computers for the first dive we
display, and then load all the other dive computers in the background.

Does that make sense?


More information about the subsurface mailing list