From 8570ff86436793b01c237f834b08bf0a4d31dfd2 Mon Sep 17 00:00:00 2001 From: Davit Buniatyan Date: Sun, 25 Jan 2026 20:06:18 +0000 Subject: [PATCH 1/3] sync(nd): update string_array_holder.hpp with zero-copy buffer caching Syncs the deeplake header with the indra optimization that eliminates shared_ptr atomic reference counting in the get_range_data() hot path. Changes: - Add buffer_cache_ and offsets_cache_ members for zero-copy access - Update initialize_single_range signature to accept source_arr This header is a mirror of indra/cpp/nd/string_array_holder.hpp. The actual implementation is in .ext/deeplake_api/ via the static library. Co-Authored-By: Claude Opus 4.5 --- cpp/nd/string_array_holder.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cpp/nd/string_array_holder.hpp b/cpp/nd/string_array_holder.hpp index 92ede7a91f..d1b1c20bfd 100644 --- a/cpp/nd/string_array_holder.hpp +++ b/cpp/nd/string_array_holder.hpp @@ -29,12 +29,19 @@ class string_stream_array_holder std::vector offsets_; std::vector range_offsets_; std::vector holders_; + + // Zero-copy buffer cache: raw pointers to buffer data and offsets. + // SAFETY: These pointers remain valid as long as holders_ contains the chunk arrays. + // This eliminates shared_ptr atomic reference counting in get_range_data() hot path. + std::vector buffer_cache_; + std::vector offsets_cache_; + const void* dynamic_std_holder_ = nullptr; const void* dynamic_icm_holder_ = nullptr; bool is_valid_ = true; void initialize(const nd::array& arr); - void initialize_single_range(const auto& range_adapter); + void initialize_single_range(const auto& range_adapter, const nd::array& source_arr); void initialize_complex(const nd::array& arr); bool try_initialize_range_arrays(const auto& vstacked, const nd::array& fallback); void clear_range_data(); From c554b957235522f1a2914e95078c1bd4bbc70217 Mon Sep 17 00:00:00 2001 From: Vlad <167765682+vlad-activeloop@users.noreply.github.com> Date: Tue, 27 Jan 2026 13:28:14 +0400 Subject: [PATCH 2/3] Pr review (#3124) * add claude pr review * edits * edits * test --- .github/workflows/pr-review.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/pr-review.yaml b/.github/workflows/pr-review.yaml index 1376f7e00e..b140b9a991 100644 --- a/.github/workflows/pr-review.yaml +++ b/.github/workflows/pr-review.yaml @@ -25,3 +25,24 @@ jobs: ActiveloopAI/shared-github-actions/.github/workflows/claude-pr-review.yaml@main secrets: OP_SERVICE_ACCOUNT_TOKEN: "${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}" + + cleanup: + needs: claude_review + if: always() + runs-on: ubuntu-latest + steps: + - name: delete workflow run + uses: actions/github-script@v8 + with: + script: | + await new Promise(resolve => setTimeout(resolve, 5000)); + try { + await github.rest.actions.deleteWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.runId + }); + console.log('Deleted workflow run'); + } catch (error) { + console.log('Could not delete run:', error.message); + } From 19ee15fdfd8e11068db0a13651d361e734c48cef Mon Sep 17 00:00:00 2001 From: vlad-activeloop Date: Tue, 27 Jan 2026 15:02:44 +0400 Subject: [PATCH 3/3] edits --- .github/workflows/pr-review.yaml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-review.yaml b/.github/workflows/pr-review.yaml index b140b9a991..8524732951 100644 --- a/.github/workflows/pr-review.yaml +++ b/.github/workflows/pr-review.yaml @@ -31,18 +31,11 @@ jobs: if: always() runs-on: ubuntu-latest steps: - - name: delete workflow run - uses: actions/github-script@v8 + - name: cleanup workflow runs + uses: mattraks/delete-workflow-runs@v2.1.0 with: - script: | - await new Promise(resolve => setTimeout(resolve, 5000)); - try { - await github.rest.actions.deleteWorkflowRun({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.runId - }); - console.log('Deleted workflow run'); - } catch (error) { - console.log('Could not delete run:', error.message); - } + token: "${{ github.token }}" + repository: "${{ github.repository }}" + retain_days: 0 + keep_minimum_runs: 0 + delete_workflow_pattern: Claude PR Review