delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/03/11/19:22:08

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
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==
Date: Fri, 11 Mar 2022 16:22:18 -0800
From: Gary Johnson <garyjohn AT spocom DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash runs my vim slower than Cygwin's vim
Message-ID: <20220312002218.GD10070@phoenix>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20220311005540 DOT GB5869 AT phoenix>
<20220311090306 DOT mei46daorlpgorym AT lucy DOT dinwoodie DOT org>
<20220311173910 DOT GB10070 AT phoenix> <20220311204339 DOT GC10070 AT phoenix>
MIME-Version: 1.0
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

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


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019