From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by sourceware.org (Postfix) with ESMTPS id 55F4B399082C for ; Wed, 12 May 2021 18:04:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 55F4B399082C Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MScDh-1m5SW82brF-00SufO for ; Wed, 12 May 2021 20:04:09 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 21AC4A80E0B; Wed, 12 May 2021 20:04:09 +0200 (CEST) Date: Wed, 12 May 2021 20:04:09 +0200 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: [PATCH setup] Add new option '--compact-os' Message-ID: Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <5d57a3f5-b595-2196-12ed-1c409d46be2a@t-online.de> <02f5ecb0-433b-262d-f56e-c5394c5f07bd@dronecode.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <02f5ecb0-433b-262d-f56e-c5394c5f07bd@dronecode.org.uk> X-Provags-ID: V03:K1:fOwVZ/ZR6Ho8PpLFRWDRaWcvxsi4HOmAr3kA9s4G2GIed0qSRCg mAvWL8X3PB9kJDrgIRNaEL82fP8EAtvSgazQEoMwraSWi27FA56fVyeQyhLsRwBAUsPjiAw 863Ys7Wqfq4wg0n97XWHfwp27H/Ke7Zh9OVw4TSKk8n5kNBenCP30vDtPEJ8b+mm+zaKiYb l3JqpiKPh3H6qPjdUZ2gQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:AHisvizg8t0=:9Ao2envhH+cxSgKCi38co0 RabZmBdXbFt30h7nXTfL7yW/MBBF8AE3T3Z0lN34X35S247P6FOCyq2lbUR1/8GVagciH72QT NVbDcuOL/m5ZxoPQaO0TbR4TqwcvhXSYdymhF0JELYODlKCAdG3Kphq3m9Dkb/QATp+l+ORtO o/MlO01mnVeeRkfQku07gkEGfp1l41FrlaiRUVXHY+TuC/t67Iq3h6Bx+kYH5R5wnXDMkdnm6 kR4gPfYaVTJTcxLquztNm8uBOWZZgvaG2bQC0LUgkJExBHp3dN8zRmR3MMrodvnV726miyulz qo0cCpLKYjyJtHe39/lYiVk1AWBvPfWE88WSVO9GRtu1gx1vV/UOueGjsl4GNIj2kvbRkFeep s1ghG8t55zxSAEdvasgbFtoYbn4v/UeYKl+uvKnlvQrBpWoE6P4NhcN2ERWt9dcBawl4uUDmT 0Ru683JvFitTkm8dKH7jopgmBh+m52H5eklxRoHNvC4+eSO/iW1b7Qu3hUz4R3H/1uSHoapkZ fPjOG8dZDErFQL+pyFcuc0= X-Spam-Status: No, score=-100.1 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2021 18:04:12 -0000 On May 12 16:14, Jon Turney wrote: > On 08/05/2021 21:03, Christian Franke wrote: > [...] > > +bool io_stream_cygfile::compact_os_is_available = (OSMajorVersion () >= 10); > > The documentation seems a bit vague, but are we really expecting this to > work on Windows 10 1507? I think this could even work under 8.1 from what I can see on MSDN. > > +{ > > + const char * const p = name.c_str(); > > + if (!(!strncmp (p, "/bin/", 5) || !strncmp (p, "/sbin/", 6) || !strncmp (p, "/usr/", 5))) > > + return true; /* File is not in R/O tree. */ > > + const size_t len = name.size(); /* >= 5 */ > > + if (!strcmp (p + (len - 4), ".dll") || !strcmp (p + (len - 3), ".so")) > > + return true; /* Rebase will open file for writing which uncompresses the file. */ > > + if (!strcmp (p + (len - 3), ".gz") || !strcmp (p + (len - 3), ".xz")) > > + return true; /* File is already compressed. */ > > Is this an assertion that there are no .bz2, .lzma, .zst etc. files in the > install? Another question is this: FILE_PROVIDER_COMPRESSION_LZX "This algorithm is designed to be highly compact, and provides for small footprint for infrequently accessed data." When running a shell script, certain executables (especially coreutils, gawk, sed, grep, find) are not so very infrequently accessed. Is this compression really feasible for these binaries? Did you compare shell script performance with non-compressed, XPRESS16K and LZX compressed /bin dir? You know how Cygwin is already slow... Thanks, Corinna