public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: "Riedel,Till (TM)" <till.riedel@kit.edu>, cygwin@cygwin.com
Subject: Re: man incredibly slow because it scans for share directory in PATH??
Date: Sun, 12 Jun 2016 14:41:00 -0000	[thread overview]
Message-ID: <310054882.20160612134916@yandex.ru> (raw)
In-Reply-To: <19074b1d-78d1-a425-5a79-434ce8b1d480@kit.edu>

Greetings, Riedel,Till (TM)!

> I traced down my problem with really slow man page views this:

> {{{

 >>PATH="/usr/bin:/foo" strace man bar |grep 'foo/share'

> }}}

> I am getting this:

> {{{

>     13   39756 [main] man 6688 normalize_posix_path: src /foo/share/man
>     16   39772 [main] man 6688 normalize_posix_path: /foo/share/man = 
> normalize_posix_path (/foo/share/man)
>     13   39785 [main] man 6688 mount_info::conv_to_win32_path: 
> conv_to_win32_path (/foo/share/man)
>     12   39810 [main] man 6688 mount_info::conv_to_win32_path: src_path 
> /foo/share/man, dst C:\tools\cygwin\foo\share\man, flags 0x3000A, rc 0
>     16   39912 [main] man 6688 mount_info::conv_to_win32_path: 
> conv_to_win32_path (/foo/share)
>     14   39942 [main] man 6688 mount_info::conv_to_win32_path: src_path 
> /foo/share, dst C:\tools\cygwin\foo\share, flags 0x3000A, rc 0

> }}}

> If my PATH is the real one this goes on forever, and generates some 
> problems,like:

You have lots of duplicated, obsolete and overlapping paths in your %PATH%.
I suggest you start from some homecleaning.
Not to mention strange ones, like "/".

> {{{

 >>time man bar
> No manual entry for bar

> real    0m23.650s
> user    0m0.000s
> sys     0m0.108s

> hanging e.g. on

>     20 2449004 [main] man 8124 mount_info::conv_to_win32_path: src_path 
> //share/man, dst \\share\man, flags 0x4022, rc 0

> }}}

> VS.

> {{{

 >>PATH=/usr/bin/ bash -c "time man bar"
> No manual entry for bar

> real    0m0.082s
> user    0m0.031s
> sys     0m0.045s

> }}}

> Any ideas why man does look for "share" in the whole path? Tbh I haven't 
> looked at the man source code. Thx in advance!


-- 
With best regards,
Andrey Repin
Sunday, June 12, 2016 13:47:12

Sorry for my terrible english...


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

  reply	other threads:[~2016-06-12 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12 10:50 Riedel,Till (TM)
2016-06-12 14:41 ` Andrey Repin [this message]
2016-06-12 17:18   ` Riedel,Till (TM)
2016-06-12 17:22     ` Achim Gratz
2016-06-13 19:38       ` Linda Walsh
2016-06-14  7:45         ` Achim Gratz
2016-06-14 22:22           ` Linda Walsh
2016-06-15  4:58             ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=310054882.20160612134916@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=till.riedel@kit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).