Opened 12 hours ago
Last modified 94 minutes 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)
Change History (8)
comment:1 Changed 12 hours ago by glebm (Gleb Mazovetskiy)
Component: | ports → base |
---|
comment:2 Changed 11 hours ago by jmroot (Joshua Root)
Type: | request → defect |
---|
comment:3 Changed 11 hours ago by glebm (Gleb Mazovetskiy)
Would it make sense to ship an index with each release as a starting point?
comment:4 Changed 10 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).
comment:5 follow-up: 7 Changed 5 hours ago by glebm (Gleb Mazovetskiy)
Ah, thank you!
What I did was:
- Install MacPorts 2.9.3 (latest available for macOS 10.4)
- 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 5 hours ago by glebm (Gleb Mazovetskiy)
Attachment: | Screenshot from 2024-11-14 10-44-33.png added |
---|
comment:6 Changed 5 hours 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,
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.