Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-c.one.com (mx-c.one.com [91.198.169.50])
	by mail6.local.one.com (Postfix) with ESMTP id 691633001EC3D3
	for <filtered@awaresystems.be>; Mon,  5 Jan 2015 14:11:31 +0000 (UTC)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-c: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.217.179 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179])
	by mx-c.one.com (Postfix) with ESMTP id 20AF045739F
	for <filtered@awaresystems.be>; Mon,  5 Jan 2015 14:11:31 +0000 (UTC)
Received: by mail-lb0-f179.google.com with SMTP id z11so17511671lbi.24
        for <filtered@awaresystems.be>; Mon, 05 Jan 2015 06:11:30 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to
         :mime-version:in-reply-to:references:date:message-id:from:to:subject
         :precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-type:mime-version:sender:errors-to;
        bh=fz5XgLj83xz2UMF67Ek/TO1KnpBSMNAiYcPn6RRfrdM=;
        b=iYlicZnNe00Dto8F0919h3q1KAAFFzXbZNEg6WVhuza5ROV6iiFHx8ezLz/qsUHKgj
         zhkSloyuXjqbdz3W8CUlOCk7OdSMxpx6WLbUiFKOtjm4opKtdWlR13Qdw2dW+oaMu+y1
         Joy0EYWA3hdgFR/wVEp1wwJRlZFsYPM6QjFtZVfAR7uOU6CShZFyckT/itXzS9LOxzcO
         P3DErlx9Trd0d1OyoiCW0eLTEYb5dHwNOZ+l1buBJyqTd8tL/qo8sDHVQZecTbTx/lTI
         OxjWkSjqtuPXZWJOjLMVIlFefn9ashnLaksC+VzvHlskCzpfKZFWBhws9DFdiCfwusly
         DRvw==
X-Original-Authentication-Results: mx.google.com;       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.153.4.44 with SMTP id cb12mr84409442lad.30.1420467090790;
        Mon, 05 Jan 2015 06:11:30 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.114.181.147 with SMTP id dw19csp3649104ldc;
        Mon, 5 Jan 2015 06:11:30 -0800 (PST)
X-Received: by 10.112.132.67 with SMTP id os3mr91186101lbb.90.1420467086981;
        Mon, 05 Jan 2015 06:11:26 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=195.47.247.147;
Received: by 10.152.105.137 with POP3 id gm9mf19737764lab.6;
        Mon, 05 Jan 2015 06:11:26 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-v.one.com (mx-v.one.com [195.47.247.147])
	by mail6.local.one.com (Postfix) with ESMTP id 2422A3001EC3C6
	for <info@awaresystems.be>; Mon,  5 Jan 2015 14:08:04 +0000 (UTC)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-v.one.com (Postfix) with ESMTP id EC9B265C7C0
	for <info@awaresystems.be>; Mon,  5 Jan 2015 14:08:03 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 787A035C04F;
	Mon,  5 Jan 2015 09:07:14 -0500 (EST)
Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com
	[209.85.212.170])
	by lists.maptools.org (Postfix) with ESMTPS id 9A54D35C034
	for <tiff@lists.maptools.org>; Mon,  5 Jan 2015 09:07:09 -0500 (EST)
Received: by mail-wi0-f170.google.com with SMTP id bs8so4191624wib.1
	for <tiff@lists.maptools.org>; Mon, 05 Jan 2015 06:07:18 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.180.108.235 with SMTP id hn11mr25749059wib.14.1420466837805; 
	Mon, 05 Jan 2015 06:07:17 -0800 (PST)
Received: by 10.194.161.196 with HTTP; Mon, 5 Jan 2015 06:07:17 -0800 (PST)
In-Reply-To: <CAK8GPyB2oJU-B7E_EB+_zTQvc7R6kq9ge3JiqHjP85JP8WH1Dw@mail.gmail.com>
References: <CAK8GPyDdAzUwt7ZTmfF+NT+ceGwvxFPUD+CRq6unxT9KEe5JwQ@mail.gmail.com>
	<alpine.GSO.2.01.1501011102040.18732@freddy.simplesystems.org>
	<CAK8GPyAfmhtC3OaokrkAuLX75iWfDCHnhPS+sjyyZvFE=N6w5A@mail.gmail.com>
	<56071.99.237.145.54.1420262656.squirrel@www.sidefx.com>
	<CAK8GPyA_--nXP7tn5tK3=XnLfXQGE7+BQGmkU54Xs1R2QpW5QA@mail.gmail.com>
	<CAK8GPyC7M6DuLMtG_UtadsurUvEMbFagSx0BD1aBZjjaJa2i6Q@mail.gmail.com>
	<alpine.GSO.2.01.1501042246490.18732@freddy.simplesystems.org>
	<CAK8GPyAoJDi8cisMeg1O6F5bo-LSq6=N==16BwE7PzB7iWHnyg@mail.gmail.com>
	<CAK8GPyB2oJU-B7E_EB+_zTQvc7R6kq9ge3JiqHjP85JP8WH1Dw@mail.gmail.com>
Date: Mon, 5 Jan 2015 09:07:17 -0500
Message-ID: <CAK8GPyAGPMTodQg0LWzekHFaRmOPUgoFUHaefhbwViR2D=+3ZA@mail.gmail.com>
From: Aaron Boxer <boxerab@gmail.com>
To: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Fast TIFF Reading on Windows
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1114429275=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1114429275==
Content-Type: multipart/alternative; boundary=089e01419c0a48610b050be8357a

--089e01419c0a48610b050be8357a
Content-Type: text/plain; charset=UTF-8

On Mon, Jan 5, 2015 at 8:47 AM, Aaron Boxer <boxerab@gmail.com> wrote:

>
> ---------- Forwarded message ----------
> From: Aaron Boxer <boxerab@gmail.com>
> Date: Mon, Jan 5, 2015 at 8:44 AM
> Subject: Re: [Tiff] Fast TIFF Reading on Windows
> To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
>
>
>
>
> On Sun, Jan 4, 2015 at 11:49 PM, Bob Friesenhahn <
> bfriesen@simple.dallas.tx.us> wrote:
>
>> On Sun, 4 Jan 2015, Aaron Boxer wrote:
>>
>>  Another finding: reading files with four threads (I have a quad core i7)
>>> is about twice as fast as single threaded
>>> reads.
>>>
>>
>> With this approach do you have one thread calling libtiff APIs at a time?
>
>
> With the threaded approach, I have a thread safe list of files in a
> directory, and each thread gets the next
> file name in the list and loads with libtiff. So, yes, I haven't changes
> the library, just calling it from multiple threads.
>
> What would be interesting is to use multiple threads to read a single TIFF
> image. This would be particularly advantageous
> for BigTIFF.  My library is using C++11, so threading support is baked
> in.  Its quite easy, keeping in mind that threads are evil.
> For libtiff, one would need to find a good cross platform C threading
> library.
>
> For a single file, the approach could be similar: a thread safe list of
> strips, and each thread gets the next strip and reads it in.
>
> Actually, this would be a perfect job for OpenMP.  And you wouldn't need a
thread safe list, just divide up the strips evenly across threads.

--089e01419c0a48610b050be8357a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Mon, Jan 5, 2015 at 8:47 AM, Aaron Boxer <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:boxerab@gmail.com" target=3D"_blank">boxerab@gmail.com</a>&gt;=
</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px=
 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div cl=
ass=3D"HOEnZb"><div class=3D"h5"><div dir=3D"ltr"><br><div class=3D"gmail_q=
uote">---------- Forwarded message ----------<br>From: <b class=3D"gmail_se=
ndername">Aaron Boxer</b> <span dir=3D"ltr">&lt;<a href=3D"mailto:boxerab@g=
mail.com" target=3D"_blank">boxerab@gmail.com</a>&gt;</span><br>Date: Mon, =
Jan 5, 2015 at 8:44 AM<br>Subject: Re: [Tiff] Fast TIFF Reading on Windows<=
br>To: Bob Friesenhahn &lt;<a href=3D"mailto:bfriesen@simple.dallas.tx.us" =
target=3D"_blank">bfriesen@simple.dallas.tx.us</a>&gt;<br><br><br><div dir=
=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"><spa=
n>On Sun, Jan 4, 2015 at 11:49 PM, Bob Friesenhahn <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@si=
mple.dallas.tx.us</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote=
" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><=
span>On Sun, 4 Jan 2015, Aaron Boxer wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Another finding: reading files with four threads (I have a quad core i7) is=
 about twice as fast as single threaded<br>
reads.<br>
</blockquote>
<br></span>
With this approach do you have one thread calling libtiff APIs at a time?</=
blockquote><div><br></div></span><div>With the threaded approach, I have a =
thread safe list of files in a directory, and each thread gets the next<br>=
</div><div>file name in the list and loads with libtiff. So, yes, I haven&#=
39;t changes the library, just calling it from multiple threads.<br><br></d=
iv><div>What would be interesting is to use multiple threads to read a sing=
le TIFF image. This would be particularly advantageous<br></div><div>for Bi=
gTIFF.=C2=A0 My library is using C++11, so threading support is baked in.=
=C2=A0 Its quite easy, keeping in mind that threads are evil.<br></div><div=
>For libtiff, one would need to find a good cross platform C threading libr=
ary.<br></div><div><br></div><div>For a single file, the approach could be =
similar: a thread safe list of strips, and each thread gets the next strip =
and reads it in.<span><font color=3D"#888888"><br></font></span></div><span=
><font color=3D"#888888"><div><br></div></font></span></div></div></div></d=
iv></div></div></div></blockquote><div>Actually, this would be a perfect jo=
b for OpenMP.=C2=A0 And you wouldn&#39;t need a thread safe list, just divi=
de up the strips evenly across threads. <br></div></div><br></div></div>

--089e01419c0a48610b050be8357a--

--===============1114429275==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============1114429275==--
