support for images per dive

Dirk Hohndel dirk at
Sat Jan 4 16:43:54 UTC 2014

On Jan 4, 2014, at 4:28 PM, Linus Torvalds <torvalds at> wrote:

> On Sat, Jan 4, 2014 at 4:16 PM, Lubomir I. Ivanov <neolit123 at> wrote:
>> i suggested that we use byte chunks in XML e.g. embedding raw
>> PNG/JPEG/format in a XML tag which is ugly but doesn't break the
>> format
> Please no.

Funny. That’s what I said. I only wasn’t as polite as you :-)

> The xml file is *already* slow to open. You may not notice this with
> small test-files, but on slow laptops (think traveling) and thousands
> of dives (think serious divers), it's a couple of seconds just to open
> and parse the xml.
> Which is borderline fine, but it's something that we definitely must
> not make worse. And attaching pictures in the xml would make it *much*
> worse.

That’s one of the many reasons not to do this. Also, a dozen good pictures
from a dive would add about 100MB (in decent resolution). Think 500 dives
and we are talking 50GB. That’s. Umm. BIG.

> Quite frankly, I'd much rather have a separate association, quite
> independent of the xml. Perhaps a separate photos file that would have
> a way to associate the dives (possibly just by date and time) with a
> collection of photos. Set up so that the photos can be loaded lazily
> when the dive is looked up, not synchronously when the dive log is
> loaded.

As I said in my previous email, I’m not opposed to bundling things.
Given the quick calculation above I think I’d limit the resolution so that
any picture is 200kB or less. But having this all bundled in a zip file so
that you can share it… why not.


More information about the subsurface mailing list