Opened 18 hours ago

Last modified 8 hours ago

#71307 new defect

`portindex` is very slow on PPC macOS 10.4

Reported by: glebm (Gleb Mazovetskiy) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.10.4
Keywords: Cc:
Port:

Description

I'm installing MacPorts on a PPC macOS 10.4 in qemu and portindex has been running this command for 3 hours already:

/opt/local/libexec/macports/bin/tclsh8.6 /opt/local/bin/portindex /opt/local/var/macports/sources/rsync.macport

I'm new to MacPorts and tcl, so I don't understand what the portindex script does. I did, however, notice that it sets up a worker pool.

If it's CPU-bound, perhaps it'd be faster to avoid threading and mutexes on single-core machines, such as the G4 that I'm emulating? I don't actually know whether that's the bottleneck, just throwing the idea out there.

Attachments (1)

Screenshot from 2024-11-14 10-44-33.png (17.6 KB) - added by glebm (Gleb Mazovetskiy) 11 hours ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 18 hours ago by glebm (Gleb Mazovetskiy)

Component: portsbase

comment:2 Changed 17 hours ago by jmroot (Joshua Root)

Type: requestdefect

If you don't have an existing PortIndex to update, it's parsing every Portfile. That can easily take 20 minutes single-threaded on recent hardware, so I'm not at all surprised that it takes many hours under qemu.

comment:3 Changed 17 hours ago by glebm (Gleb Mazovetskiy)

Would it make sense to ship an index with each release as a starting point?

Last edited 17 hours ago by glebm (Gleb Mazovetskiy) (previous) (diff)

comment:4 Changed 16 hours ago by ryandesign (Ryan Carsten Schmidt)

We do have indexes for all OS version / architecture combinations on the rsync server. MacPorts will retrieve the correct index for your system when you run sudo port sync and will then update it as needed if it is not up to date.

Generating the full index also takes many hours on our server (or it used to, before portindex became multithreaded recently).

Last edited 16 hours ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 12 hours ago by glebm (Gleb Mazovetskiy)

Ah, thank you!

What I did was:

  1. Install MacPorts 2.9.3 (latest available for macOS 10.4)
  2. Run sudo port selfupdate to update to the actual latest release, 2.10.4.

The second command triggered generating the full index.

Perhaps port selfupdate should run port sync?

Changed 11 hours ago by glebm (Gleb Mazovetskiy)

comment:6 Changed 11 hours ago by glebm (Gleb Mazovetskiy)

Actually it told me to run selfupdate after it couldn't find the index file

https://trac.macports.org/attachment/ticket/71307/Screenshot%20from%202024-11-14%2010-44-33.png

I ran port sync manually and that worked perfectly,

Version 2, edited 11 hours ago by glebm (Gleb Mazovetskiy) (previous) (next) (diff)

comment:7 in reply to:  5 Changed 8 hours ago by jmroot (Joshua Root)

Replying to glebm:

Perhaps port selfupdate should run port sync?

It does.

Note: See TracTickets for help on using tickets.