Skip to content

Conversation

@XuanYang-cn
Copy link
Contributor

Cython Integration

  • Added _fast_extract.pyx with optimized functions:
    • assign_scalar_fast(): 2-3x faster scalar field assignment
    • assign_array_fast(): Optimized array field processing
  • Modified entity_helper.py to use Cython fast path with pure Python fallback
  • Replaced list comprehensions with for loops for better Cython optimization
  • Converted protobuf RepeatedScalarFieldContainer to list for faster indexing

Build System

  • Added setup.py with optional Cython extension building
  • Created MANIFEST.in for source distribution packaging
  • Updated pyproject.toml:
    • Added Cython build requirement
    • Added cibuildwheel configuration for multi-platform wheels
    • Added performance profiling tools to dev dependencies

**Cython Integration**
- Added `_fast_extract.pyx` with optimized functions:
  - `assign_scalar_fast()`: 2-3x faster scalar field assignment
  - `assign_array_fast()`: Optimized array field processing
- Modified `entity_helper.py` to use Cython fast path with pure Python fallback
- Replaced list comprehensions with `for` loops for better Cython optimization
- Converted protobuf `RepeatedScalarFieldContainer` to list for faster indexing

**Build System**
- Added `setup.py` with optional Cython extension building
- Created `MANIFEST.in` for source distribution packaging
- Updated `pyproject.toml`:
  - Added Cython build requirement
  - Added cibuildwheel configuration for multi-platform wheels
  - Added performance profiling tools to dev dependencies

Signed-off-by: yangxuan <[email protected]>
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: XuanYang-cn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@XuanYang-cn XuanYang-cn added the PR | need to cherry-pick to 2.x This PR need to be cherry-picked to 2.x branch label Oct 21, 2025
@mergify mergify bot added the dco-passed label Oct 21, 2025
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 19.14894% with 38 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@920df7b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pymilvus/client/entity_helper.py 20.45% 35 Missing ⚠️
pymilvus/client/search_result.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3038   +/-   ##
=========================================
  Coverage          ?   45.21%           
=========================================
  Files             ?       65           
  Lines             ?    13643           
  Branches          ?        0           
=========================================
  Hits              ?     6169           
  Misses            ?     7474           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot added the ci-passed label Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants