[MacPorts] #56793: macports base: installing a port with many files appears to hang; file registration loop slows dramatically for file counts > 10,000

MacPorts noreply at macports.org
Sun May 23 21:12:57 UTC 2021


#56793: macports base: installing a port with many files appears to hang; file
registration loop slows dramatically for file counts > 10,000
-----------------------+----------------------
  Reporter:  yan12125  |      Owner:  mascguy
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  base      |    Version:  2.7.0
Resolution:            |   Keywords:
      Port:            |
-----------------------+----------------------

Comment (by mascguy):

 FYI, I'm rerunning the timing test, with the following modification to the
 file registration loop in `portinstall.tcl`:

 {{{
         if {[info exists installPlist]} {
             ui_msg "Registering files - START"

             set clicks_open_total 0
             set clicks_binary_total 0

             # register files
             $regref map $installPlist
             foreach f [array names portinstall::file_is_binary] {
                 ui_debug "Registering file: ${f}"

                 set clicks_open_start [clock clicks -microseconds]
                 set fileref [registry::file open [$regref id] $f]
                 set clicks_open_end [clock clicks -microseconds]
                 set clicks_open [expr { ${clicks_open_end} -
 ${clicks_open_start} }]

                 set clicks_binary_start [clock clicks -microseconds]
                 $fileref binary $portinstall::file_is_binary($f)
                 set clicks_binary_end [clock clicks -microseconds]
                 set clicks_binary [expr { ${clicks_binary_end} -
 ${clicks_binary_start} }]

                 set clicks_open_total [expr { ${clicks_open_total} +
 ${clicks_open} }]
                 set clicks_binary_total [expr { ${clicks_binary_total} +
 ${clicks_binary} }]

                 ui_debug "File Time: open: ${clicks_open}, binary:
 ${clicks_binary}"
             }

             ui_msg "Registering files - END"
             ui_msg "Total Time: open: ${clicks_open_total}, binary:
 ${clicks_binary_total}"
         }
 }}}

 I'll attach the full log once it completes.

-- 
Ticket URL: <https://trac.macports.org/ticket/56793#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list