Opened 8 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)
Change History (10)
comment:1 Changed 8 days ago by glebm (Gleb Mazovetskiy)
Component: | ports → base |
---|
comment:2 Changed 8 days ago by jmroot (Joshua Root)
Type: | request → defect |
---|
comment:3 Changed 8 days ago by glebm (Gleb Mazovetskiy)
Would it make sense to ship an index with each release as a starting point?
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 (or it used to, before portindex became multithreaded recently).
comment:5 follow-ups: 7 9 Changed 7 days 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 7 days ago by glebm (Gleb Mazovetskiy)
Attachment: | Screenshot from 2024-11-14 10-44-33.png added |
---|
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,
comment:7 Changed 7 days ago by jmroot (Joshua Root)
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 Changed 6 days ago by ryandesign (Ryan Carsten Schmidt)
Replying to glebm:
- 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.
If you installed using the pre-compiled installer package, it automatically runs selfupdate at the end of the installation.
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.