From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.spocom.com (mail.spocom.com [206.63.224.240]) by sourceware.org (Postfix) with ESMTP id C5D883858C27 for ; Sat, 12 Mar 2022 00:21:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C5D883858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=spocom.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=spocom.com DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; d=spocom.com; s=mail; h=received:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:x-operating-system:user-agent; b=gF5Ft9fIQx3dRrEO1um66Bq/LSR2aKHp9ky4iQxuIJ3PSO0x01niCkR9rpluRqFBl 7Jk0NCk8XlB3GfTPmnRhg== Received: from localhost (174-31-104-35.spkn.qwest.net [174.31.104.35]) by mail.spocom.com with SMTP; Fri, 11 Mar 2022 16:21:33 -0800 Date: Fri, 11 Mar 2022 16:22:18 -0800 From: Gary Johnson To: cygwin@cygwin.com Subject: Re: Bash runs my vim slower than Cygwin's vim Message-ID: <20220312002218.GD10070@phoenix> Mail-Followup-To: cygwin@cygwin.com References: <20220311005540.GB5869@phoenix> <20220311090306.mei46daorlpgorym@lucy.dinwoodie.org> <20220311173910.GB10070@phoenix> <20220311204339.GC10070@phoenix> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220311204339.GC10070@phoenix> X-Operating-System: Linux 2.6.32-74-generic GNU/Linux User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2022 00:21:51 -0000 On 2022-03-11, Gary Johnson wrote: > On 2022-03-11, Gary Johnson wrote: > > On 2022-03-11, Adam Dinwoodie wrote: > > > On Thu, Mar 10, 2022 at 04:55:40PM -0800, Gary Johnson wrote: > > > > > So, does anyone know why is takes so much longer for bash to run the > > > > vim I built than the official Cygwin vim? More importantly, how do > > > > I fix this? > > > > - Cygwin packages built using Cygport and packaged for release will have > > > the binaries stripped, removing debug symbols and the like and > > > separating them into a different -debug package. That means that the > > > binaries that are loaded for day-to-day use are smaller, and may well > > > mean they're faster too. > > > > The Cygwin vim was built with -ggdb, but I didn't look for strip and > > Cygwin's file doesn't report whether or not binaries are stripped-- > > it probably can't determine that. I'll try stripping mine. > > Just a quick update: I stripped my version and the real time for my > benchmark test dropped from 1.42 s to 0.40 s. Still not as low as > Cygwin's vim (0.12 s), but a substantial improvement. I installed cygport and built vim using Adam's command. It wanted some libraries that I don't have installed, such as for X, which I don't use on Windows, so I modified vim.cygport to not require those. The result ran a little slower than /usr/bin/vim. So to really understand this, I will probably have to install those libraries and run vim.cygport unmodified. However, by changing CFLAGS to remove -g3 and add -O2 for my own build, and by stripping the binary, the startup time for vim to edit a particular file dropped from 8 seconds to 2 seconds, and even using /usr/bin/vim takes 1.4 seconds, so I'm happy for now. Thanks, Adam, for the help. Regards, Gary