Skip to content

FEAT: GIL release and LOB fast-path for parallel execution#471

Closed
wiederMatan wants to merge 4 commits intomicrosoft:mainfrom
wiederMatan:feat/macbook-gil-lob-turbo
Closed

FEAT: GIL release and LOB fast-path for parallel execution#471
wiederMatan wants to merge 4 commits intomicrosoft:mainfrom
wiederMatan:feat/macbook-gil-lob-turbo

Conversation

@wiederMatan
Copy link

@wiederMatan wiederMatan commented Mar 7, 2026

Work Item / Issue Reference

GitHub Issue: N/A


Summary

The Problem: High-concurrency tools like dbt are bottlenecked by the GIL and slow row-by-row LOB fetching in the native driver.

The Solution:

  • GIL Release: Implemented py::call_guard<py::gil_scoped_release> for core ODBC operations (connect, execute, fetch).
  • LOB Fast-Path: Increased threshold to 64KB, enabling SQLFetchScroll (Batch Mode) for most metadata queries.
  • Thread Safety: Protected shared state with std::mutex.

Results: 8-thread WAITFOR test dropped from ~16s to ~2.1s. Verified on both MacBook (Apple Silicon) and Windows (MSVC).

wiederMatan and others added 2 commits March 7, 2026 23:12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wiederMatan
Copy link
Author

@microsoft-github-policy-service agree

@wiederMatan wiederMatan changed the title Feat/macbook gil lob turbo DOC: Add CLAUDE.md for Claude Code guidance Mar 7, 2026
Remove CLAUDE.md, preflight_check.py, and verify_performance.py
to keep the PR focused on driver performance changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wiederMatan wiederMatan changed the title DOC: Add CLAUDE.md for Claude Code guidance FEAT: GIL release and LOB fast-path for parallel execution Mar 7, 2026
…ipts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@saurabh500
Copy link
Contributor

Why did you delete the files?

@wiederMatan
Copy link
Author

Hi @saurabh500, my apologies for the noise on this PR. A local development CLI I was using for the migration had a critical issue with its cleanup routine, which incorrectly staged deletions for the entire repository tree in the most recent commit.

I’m closing this PR now to avoid further confusion and will perform a manual restore of the environment. I'll submit a clean, verified PR once the repository structure is intact and the C++ optimizations are ready for review. Thanks for catching this.

@wiederMatan wiederMatan closed this Mar 8, 2026
@microsoft-github-policy-service
Copy link
Contributor

You are not allowed to delete the mandatory files in this repo.

Total execution time: 4.54 seconds

@saurabh500
Copy link
Contributor

Looking forward to the re-submission.
The title of the PR was interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants