- 
                Notifications
    
You must be signed in to change notification settings  - Fork 61
 
delocate/delocating.py: Sanitize each file only once, parallelize #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
           Funny thing about this. If a library has a duplicate rpath than the CLI tool used to remove paths will only remove one of the duplicates.  | 
    
| 
           Right, but   | 
    
          
 "once for every bad rpath" is not the right number of times when duplicate paths are not accounted for. This has merged rpaths into a set via dictionary keys, removing duplicates which could cause them to be missed. I'll only approve this if a test exists for sanitizing a library with duplicate absolute paths and duplicate relative paths. I would agree that handling rpath duplicates should be accounted for by  If this is for performance: The performance issues from this are caused by   | 
    
| 
           I could also be misreading this. You might need to walk be through this if it's correct. Or else I might need to come back to it later.  | 
    
| 
           You are right, there's something fishy there, related to   | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion is to instead add ad_hoc_sign=False to the _remove_absolute_rpaths call and then call replace_signature on the modified files once. Assuming this was for performance.
          
 I would believe that   | 
    
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@            Coverage Diff             @@
##             main     #257      +/-   ##
==========================================
+ Coverage   97.42%   97.47%   +0.04%     
==========================================
  Files          16       16              
  Lines        1242     1265      +23     
==========================================
+ Hits         1210     1233      +23     
  Misses         32       32              ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
| 
           The existing suite of test wheels seems much too limited to be sure about the correctness of the code regarding the rpath situation  | 
    
c96a9a3    to
    5a0d0d9      
    Compare
  
    | 
           I think this method of conditional signage is wrong tactic. Files to be signed should to be propagated to the caller to be signed all at once. There are later steps of changes which will invalid the signatures of the currently touched code. Note that there is also the   | 
    
      
        
              This comment was marked as outdated.
        
        
      
    
  This comment was marked as outdated.
Refactor code to reduce redundant codesigns
5a0d0d9    to
    26f28be      
    Compare
  
    | 
           Rebased on top of #260  | 
    
26f28be    to
    a81c29c      
    Compare
  
    | 
           This speeds up the sanitizing phase to 2 minutes, bringing the total down to 16.5 minutes.  | 
    
Performance improvement based in part on a change in #256. PR is on top of #260, for fixing the handling of duplicate rpaths.
_sanitize_rpathsnow calls_remove_absolute_rpathsonly once for the same file. This saves calls tootoolto retrieve rpaths._remove_absolute_rpathsusingconcurrent.futures.ThreadPoolExecutor.Pull Request Checklist