Opened 7 days ago

Last modified 6 days 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) 7 days ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 days ago by glebm (Gleb Mazovetskiy)

Component: portsbase

comment:2 Changed 7 days 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 7 days ago by glebm (Gleb Mazovetskiy)

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

Last edited 7 days ago by glebm (Gleb Mazovetskiy) (previous) (diff)

comment:4 Changed 7 days 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.

Version 1, edited 7 days ago by ryandesign (Ryan Carsten Schmidt) (previous) (next) (diff)

comment:5 Changed 7 days 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 7 days ago by glebm (Gleb Mazovetskiy)

comment:6 Changed 7 days ago by glebm (Gleb Mazovetskiy)

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

I've now run port sync manually and that worked perfectly,

Last edited 6 days ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Replying to glebm:

Perhaps port selfupdate should run port sync?

It does.

comment:8 Changed 6 days ago by glebm (Gleb Mazovetskiy)

I see, thanks. I guess something didn't work for me because it didn't run or maybe it failed.

I'll have a look at the code later to see if I can figure that out and maybe send a PR.

comment:9 in reply to:  5 Changed 6 days ago by ryandesign (Ryan Carsten Schmidt)

Replying to glebm:

  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.

If you installed using the pre-compiled installer package, it automatically runs selfupdate at the end of the installation.

Note: See TracTickets for help on using tickets.