Skip to content

Conversation

@superhx
Copy link
Collaborator

@superhx superhx commented Nov 10, 2025

No description provided.

Gezi-lzq
Gezi-lzq previously approved these changes Nov 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces optimizations for the LogCache system and parallelizes append callbacks in S3Storage. The key changes include using adaptive initial capacity for internal ArrayList allocations based on previous block sizes, and distributing append callbacks across multiple event loops for better concurrency.

  • Added capacity hints to StreamCache initialization to reduce ArrayList resizing overhead
  • Introduced parallel execution of append callbacks using stream-based EventLoop executors
  • EventLoop threads are allocated based on CPU core count

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
LogCache.java Added Function parameter for capacity hints and new StreamCache constructor with initial capacity to optimize ArrayList allocation
S3Storage.java Introduced EventLoop array for parallel append callback execution and refactored handleAppendCallback to distribute work across executors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Robin Han <hanxvdovehx@gmail.com>
@superhx superhx merged commit dbe443b into main Nov 10, 2025
6 checks passed
@superhx superhx deleted the perf_parallel_append branch November 10, 2025 12:18
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.

3 participants