Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-z.one.com (mx-z.one.com [195.47.247.151])
	by mail6.local.one.com (Postfix) with ESMTP id 9B1AE30013D577
	for <filtered@awaresystems.be>; Mon,  5 Jan 2015 04:35:12 +0000 (UTC)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-z: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.217.174 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174])
	by mx-z.one.com (Postfix) with ESMTP id 62FAB20E546AA
	for <filtered@awaresystems.be>; Mon,  5 Jan 2015 04:35:12 +0000 (UTC)
Received: by mail-lb0-f174.google.com with SMTP id 10so17479054lbg.33
        for <filtered@awaresystems.be>; Sun, 04 Jan 2015 20:35:12 -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:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-type:mime-version:sender:errors-to;
        bh=zDZcvMvzR9e0lJ1cnwdBTN7H5zRjm3iQvD72EhfTZM8=;
        b=NBGkJm0ENdd2Xjbc44jQt8d6CTyR0nDbsQ1hVDVshG91hXSSdMP1WmUiDEWukhELI0
         Yli2CsLjmrW+L0UiyYx59gWajcGHl4lZVylyy/c2Ibb1VyTy1icRVZ8DS8XobfIwKuG7
         Zz2wFO6O4q0nciIaiqe9cy2VIQpAuUen1lCNQBYYkw7vheHMEdkNFuk01ZssUdfEc+fu
         AwchqINgOe3k/ww5tmyPc7LbakqyV0s/xNQJ2Yro3S3C+xCVp+JWqoNN5DY9jsUOS/l6
         5VVlT21dCg/VUR+Li8lQLvggrSExGgg/ssm9HBtTrdTU8gz9WSpdnXWud7gjlrTaySgw
         oYDw==
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.152.206.108 with SMTP id ln12mr89781631lac.3.1420432512047;
        Sun, 04 Jan 2015 20:35:12 -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 dw19csp3546108ldc;
        Sun, 4 Jan 2015 20:35:11 -0800 (PST)
X-Received: by 10.112.12.65 with SMTP id w1mr89667372lbb.68.1420432510893;
        Sun, 04 Jan 2015 20:35:10 -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=91.198.169.60;
Received: by 10.152.106.15 with POP3 id gq15mf19500294lab.38;
        Sun, 04 Jan 2015 20:35:10 -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-m.one.com (mx-m.one.com [91.198.169.60])
	by mail6.local.one.com (Postfix) with ESMTP id 94A7830013D561
	for <info@awaresystems.be>; Mon,  5 Jan 2015 03:40: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-m.one.com (Postfix) with ESMTP id 62C8D200B9AE1
	for <info@awaresystems.be>; Mon,  5 Jan 2015 03:40:04 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 0B89035C038;
	Sun,  4 Jan 2015 22:39:10 -0500 (EST)
Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com
	[209.85.212.172])
	by lists.maptools.org (Postfix) with ESMTPS id 0FCD035C030
	for <tiff@lists.maptools.org>; Sun,  4 Jan 2015 22:35:52 -0500 (EST)
Received: by mail-wi0-f172.google.com with SMTP id n3so2443771wiv.11
	for <tiff@lists.maptools.org>; Sun, 04 Jan 2015 19:36:01 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.180.218.74 with SMTP id pe10mr21521889wic.48.1420428960848; 
	Sun, 04 Jan 2015 19:36:00 -0800 (PST)
Received: by 10.194.161.196 with HTTP; Sun, 4 Jan 2015 19:36:00 -0800 (PST)
In-Reply-To: <56071.99.237.145.54.1420262656.squirrel@www.sidefx.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>
Date: Sun, 4 Jan 2015 22:36:00 -0500
Message-ID: <CAK8GPyA_--nXP7tn5tK3=XnLfXQGE7+BQGmkU54Xs1R2QpW5QA@mail.gmail.com>
From: Aaron Boxer <boxerab@gmail.com>
To: Edward Lam <edward@sidefx.com>
Cc: 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="===============2083008480=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============2083008480==
Content-Type: multipart/alternative; boundary=001a1134d57aa3e27e050bdf63fb

--001a1134d57aa3e27e050bdf63fb
Content-Type: text/plain; charset=UTF-8

Gentlemen,

My very informal benchmark (windows 7, SSD,  RamMAP tool to clear OS file
cache before each run):

1) twiddling windows flags made no difference to speed
2) TIFFOpenfile with mode "ru" i.e. disabling memory mapping, was 3 times
slower than with default flag "r"

So, my conclusion is that memory mapping is the way to go for performance.

Aaron



On Sat, Jan 3, 2015 at 12:24 AM, Edward Lam <edward@sidefx.com> wrote:

> On Thu, January 1, 2015 15:20, Aaron Boxer wrote:
> > Thanks. Yes, my use case is: first-read of many 10-15 MB RGB uncompressed
> > files.  Unfortunately, I don't have control over how the files are
> stored,
> > i.e. block size.  One nice feature on Linux is fadvise, where I can
> > specify FADV_SEQUENTIAL | FADV_DONTNEED, which would be right for my use
> > case.
>
> On Windows, the CreateFile() API has additional flags that you may wish to
> explore like FILE_FLAG_SEQUENTIAL_SCAN and/or FILE_FLAG_NO_BUFFERING
>
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx#caching_behavior
>
> Cheers,
> -Edward
>
>
>

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

<div dir=3D"ltr"><div><div><div><div><div>Gentlemen,<br></div><br>My very i=
nformal benchmark (windows 7, SSD,=C2=A0 RamMAP tool to clear OS file cache=
 before each run):<br><br></div>1) twiddling windows flags made no differen=
ce to speed<br></div>2) TIFFOpenfile with mode &quot;ru&quot; i.e. disablin=
g memory mapping, was 3 times slower than with default flag &quot;r&quot;<b=
r><br></div>So, my conclusion is that memory mapping is the way to go for p=
erformance. <br><br></div>Aaron<br><div><div><br><br></div></div></div><div=
 class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sat, Jan 3, 2015 a=
t 12:24 AM, Edward Lam <span dir=3D"ltr">&lt;<a href=3D"mailto:edward@sidef=
x.com" target=3D"_blank">edward@sidefx.com</a>&gt;</span> wrote:<br><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><span class=3D"">On Thu, January 1, 2015 15:20, Aar=
on Boxer wrote:<br>
&gt; Thanks. Yes, my use case is: first-read of many 10-15 MB RGB uncompres=
sed<br>
&gt; files.=C2=A0 Unfortunately, I don&#39;t have control over how the file=
s are stored,<br>
&gt; i.e. block size.=C2=A0 One nice feature on Linux is fadvise, where I c=
an<br>
&gt; specify FADV_SEQUENTIAL | FADV_DONTNEED, which would be right for my u=
se<br>
&gt; case.<br>
<br>
</span>On Windows, the CreateFile() API has additional flags that you may w=
ish to<br>
explore like FILE_FLAG_SEQUENTIAL_SCAN and/or FILE_FLAG_NO_BUFFERING<br>
<br>
<a href=3D"http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858=
%28v=3Dvs.85%29.aspx#caching_behavior" target=3D"_blank">http://msdn.micros=
oft.com/en-us/library/windows/desktop/aa363858%28v=3Dvs.85%29.aspx#caching_=
behavior</a><br>
<br>
Cheers,<br>
-Edward<br>
<br>
<br>
</blockquote></div><br></div>

--001a1134d57aa3e27e050bdf63fb--

--===============2083008480==
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/
--===============2083008480==--
