ZacBlanco opened a new issue, #13667:
URL: https://github.com/apache/skywalking/issues/13667

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar feature requirement.
   
   
   ### Description
   
   I would like the `license-eye header check` command to return faster for 
large projects. We can easily improve performance by concurrently checking 
files after listing them.
   
   The concurrency can be limited by setting GOMAXPROCS
   
   ### Use case
   
   For a large project the checking can take a long time. Most machines these 
days have a few cores, so we can speed up performance by concurrently running 
the check once we have an iterator over the list of files.
   
   On my particular project I see the following performance on a 12-core 
MacBook Pro M3
   
   ```
   $  time license-eye header check
   INFO Loading configuration from file: .licenserc.yaml 
   INFO Totally checked 3159 files, valid: 2804, invalid: 0, ignored: 355, 
fixed: 0 
   license-eye header check  73.90s user 2.95s system 105% cpu 1:12.92 total
   ```
   
   When I implement some basic concurrency primitives in the check function I 
can reduce the time by nearly 80%
   
   ```
   time ~/projects/skywalking-eyes/bin/darwin/license-eye header check
   INFO Loading configuration from file: .licenserc.yaml 
   INFO Totally checked 2899 files, valid: 2804, invalid: 0, ignored: 95, 
fixed: 0 
   ~/projects/skywalking-eyes/bin/darwin/license-eye header check  89.70s user 
4.15s system 376% cpu 24.916 total
   ```
   
   ### Related issues
   
   I have not seen any related issue for this
   
   ### Are you willing to submit a pull request to implement this on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to