On Thu, Mar 10, 2022 at 04:55:40PM -0800, Gary Johnson wrote:
> I build my own copy of Vim for the Cygwin terminal from the source
> at https://github.com/vim/vim.git.  Lately, I've noticed the startup
> time getting slower, so I investigated.  One of the things
> I discovered was this difference between the run times of the
> official Cygwin vim package and the vim I built myself.  Both are
> version 8.2.4372 and built using the same configuration and compiler
> flags except for some options such as Ruby that I don't have support
> for on my system.
> 
> <snip>
> 
> 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?

There are a few differences that jump to mind between the Cygwin
packaged Vim and your locally built Vim.  This isn't my area of
expertise by a long shot, but my guess would be it's one of these:

- 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.

- Binaries installed by Cygwin setup will get automatically added to
  Cygwin's rebase database.  I don't think that would help here --
  problems with rebase normally manifest as fork failures, not just
  slowness -- but it's another difference that seemed like it might be
  relevant.

- Cygwin's Vim has a handful of patches.  I've just had a quick look and
  none of them seem obviously likely to make a significant perf
  difference to me, but it was only a quick look and see above re lack
  of expertise :)

I suspect the best way to investigate this further will be to try to
narrow down the possible differences between your build and the official
Cygwin build.  To do that, I'd probably start with getting the source
for the official Cygwin build, compiling it using Cygport (`cygport
vim.cygport prep compile install package`), then "installing" it as if
it were a regular Cygwin package (`tar -xaf vim-*/dist/vim/vim-*.tar.*
-C /` is close enough for most purposes).

HTH

Adam

-- 
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

Reply via email to