bugDatabase-driven manual pager suite - Bugs: bug #64411, man --names-only -a -w --wildcard...

 
 

bug #64411: man --names-only -a -w --wildcard '*' is very slow

Submitter:  Tristan Wibberley <codeshot>
Submitted:  Tue 11 Jul 2023 02:03:47 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 28 Jul 2023 11:11:43 AM UTC, comment #7: 

  whatis --regex -s N

is what I needed. Yes, would be good if man -f performed just as well.

Tristan Wibberley <codeshot>
Mon 24 Jul 2023 11:48:15 AM UTC, comment #6: 

The sorting isn't actually the slow bit in this particular case - it's more about detecting and prioritizing duplicates.  I'm working on a fix.

Colin Watson <cjwatson>
Group administrator
Mon 24 Jul 2023 11:46:48 AM UTC, comment #5: 

--wildcard was ignored by "man -f" until my recent commit of https://gitlab.com/man-db/man-db/-/commit/52c54b6e4d, yes, but it's not ignored by the separate "whatis" command.  (I did mean to write "whatis --wildcard '*'" rather than "whatis -f --wildcard '*'", though.)

Colin Watson <cjwatson>
Group administrator
Sun 23 Jul 2023 12:42:41 PM UTC, comment #4: 


comment #2:

> ... see https://gitlab.com/man-db/man-db/-/commit/f80b0f187d ...


Perhaps sorting isn't required at search-time in all cases. I didn't need it at that moment, and when I did I could just use the line sorting "sort" program which is really fast.

Tristan Wibberley <codeshot>
Sun 23 Jul 2023 12:38:55 PM UTC, comment #3: 

comment #1:

> I'll look into the performance issue, but as a workaround, consider "whatis -f --wildcard '*'".


--wildcard is ignored by whatis mode (already tried that and several other techniques).

Tristan Wibberley <codeshot>
Sun 23 Jul 2023 12:07:13 AM UTC, comment #2: 

Oh right, I apparently thought about this problem back in 2008 and helpfully left a comment for my future self about the quadratic-time behaviour: see https://gitlab.com/man-db/man-db/-/commit/f80b0f187d.  At least that gives me something to work on without having to rediscover it all from scratch!

Colin Watson <cjwatson>
Group administrator
Sat 22 Jul 2023 11:57:48 PM UTC, comment #1: 

I'll look into the performance issue, but as a workaround, consider "whatis -f --wildcard '*'".

Colin Watson <cjwatson>
Group administrator
Tue 11 Jul 2023 02:03:47 PM UTC, original submission:  

command `man --names-only -a -w --wildcard '*'` is very slow to begin listing and is slow for each line output. Should be very much faster.

It's possible to script something similar but that requires script skill and also requires accurately duplicating the logic of man/mandb.

As an alternative, a way to rapidly list the page and section or page, section, and short summary is needed, I use -w only as the closest alternative to '-f' that accepts --wildcard.

Tristan Wibberley <codeshot>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by codeshot (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code