kaxil opened a new pull request, #52740:
URL: https://github.com/apache/airflow/pull/52740

   Dramatically improved performance from 1-1.5 hours to ~40 seconds by:
   - Implementing GraphQL bulk fetching with proper pagination
   - Adding parallel processing with ThreadPoolExecutor
   - Introducing intelligent pre-filtering of PR candidates
   - Optimizing search queries to prioritize high-engagement PRs
   
   The script now processes the same data 90x faster while maintaining all 
original functionality and improving code readability.
   
   Example run:
   
   ```
   ❯ python dev/stats/get_important_pr_candidates.py --date-start  2025-05-29
   🚀 Fixed Super-Fast PR Candidate Finder
   Date range: 2025-05-29 to 2025-07-01
   🔍 Phase 1: Enhanced PR discovery
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 protm
   Found 4 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 comments:>15
   Found 55 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 comments:>10 reactions:>5
   Found 0 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 review:approved comments:>8
   Found 51 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 comments:>5
   Found 59 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01 reactions:>3
   Found 2 PRs
   Searching: repo:apache/airflow type:pr is:merged 
merged:2025-05-29..2025-07-01
   Found 200 PRs
   Total unique PRs: 371
   ⚡ Phase 2: Quick scoring
   Selected 150 candidates for complete analysis
   🔥 Phase 3: Complete data fetching with proper pagination
   Fetching complete data for 150 PRs...
   GraphQL batch 1/19 complete
   GraphQL batch 2/19 complete
   GraphQL batch 3/19 complete
   GraphQL batch 4/19 complete
   GraphQL batch 5/19 complete
   GraphQL batch 6/19 complete
   GraphQL batch 7/19 complete
   GraphQL batch 8/19 complete
   GraphQL batch 9/19 complete
   GraphQL batch 10/19 complete
   GraphQL batch 11/19 complete
   GraphQL batch 12/19 complete
   GraphQL batch 13/19 complete
   GraphQL batch 14/19 complete
   GraphQL batch 15/19 complete
   GraphQL batch 16/19 complete
   GraphQL batch 17/19 complete
   GraphQL batch 18/19 complete
   GraphQL batch 19/19 complete
   Fetching linked issue data...
   Successfully processed 150 PRs with complete data
   
   🏆 Top 10 PRs:
    1. 🔥 Score: 1844.64 - PR#51699: Switch the Supervisor/task process from 
line-based to length-prefixed
        https://github.com/apache/airflow/pull/51699
    2. 🔥 Score: 1524.96 - PR#51735: i18n: Move translations to `ui/public` and 
enable dynamic loading to reduce bundle size
        https://github.com/apache/airflow/pull/51735
    3. 🔥 Score: 881.77 - PR#51805: Grid view optimization
        https://github.com/apache/airflow/pull/51805
    4. 🔥 Score: 403.20 - PR#52518: Fix various incompatibilities with 
SQLAlchemy 2.0
        https://github.com/apache/airflow/pull/52518
    5.  Score: 353.81 - PR#51258: AIP-38 Add Arabic UI translation
        https://github.com/apache/airflow/pull/51258
    6.  Score: 322.14 - PR#51059: Enable Serde for Pydantic BaseModel and 
Subclasses
        https://github.com/apache/airflow/pull/51059
    7.  Score: 219.31 - PR#50677: AIP-86 - Add Deadline References
        https://github.com/apache/airflow/pull/50677
    8.  Score: 216.58 - PR#51292: Introduce internationalization (i18n) policy
        https://github.com/apache/airflow/pull/51292
    9.  Score: 191.10 - PR#50443: Add TI bulk actions endpoint
        https://github.com/apache/airflow/pull/50443
   10.  Score: 171.99 - PR#49433: Change default executor in pod template to 
support executor parameter in task (re-uploaded)
        https://github.com/apache/airflow/pull/49433
   
   ✅ Analysis complete! Processed 150 PRs
   ```
   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a 
newsfragment file, named `{pr_number}.significant.rst` or 
`{issue_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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