Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Hical61/Hical
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.6.2
Choose a base ref
...
head repository: Hical61/Hical
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.6.3
Choose a head ref
  • 14 commits
  • 107 files changed
  • 1 contributor

Commits on May 18, 2026

  1. Configuration menu
    Copy the full SHA
    a8ab7b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a789fab View commit details
    Browse the repository at this point in the history

Commits on May 19, 2026

  1. [docs] 文档内容更新

    Hical61 committed May 19, 2026
    Configuration menu
    Copy the full SHA
    9c3fb6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa7717d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23c3973 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2026

  1. Configuration menu
    Copy the full SHA
    511a640 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2026

  1. [perf] TcpServer连接表per-loop分片 + mimalloc可选upstream + requestPool无锁扩容

    - TcpServer: 全局mutex+unordered_set改为per-loop LoopShard分片,idle扫描/增删全程无锁
    - MemoryPool: createRequestPool() upstream从globalPool改为threadLocalPool,扩容零锁竞争
    - 新增MimallocResource: 可选替代new_delete_resource作为PMR最底层分配器
    - CMake/Conan/vcpkg: 新增HICAL_WITH_MIMALLOC选项,三端同步配置
    - 测试阈值从1MB放宽至4MB,适配thread-local池正常缓存行为
    Hical61 committed May 23, 2026
    Configuration menu
    Copy the full SHA
    ae4938b View commit details
    Browse the repository at this point in the history

Commits on May 24, 2026

  1. [feat] Range 请求 (HTTP 206) + writeLoop MPSC 无锁化

    Range 请求:
    - HttpTypes.h 新增 hPartialContent=206 / hRequestedRangeNotSatisfiable=416
    - HttpResponse 新增 FileBody 结构体 + optional<FileBody> fileBody
    - StaticFiles.h 新增 parseByteRange() 解析器 + Range/If-Range 处理流程
    - HttpSessionImpl.cpp 新增 writeFileResponse() 异步分块文件发送协程
    - 200 响应添加 Accept-Ranges: bytes
    
    MPSC 无锁化:
    - GenericConnection 写队列从 mutex+deque 升级为 Vyukov Intrusive MPSC Queue
    - MpscNode/MpscQueue: wait-free O(1) push, 摊销 O(1) pop
    - enqueueEntry 移除 isInLoopThread 分支和 lock_guard
    - writeLoop 批量 drain + seq_cst 反饥饿 re-check
    - 移除 <deque> <mutex> include
    Hical61 committed May 24, 2026
    Configuration menu
    Copy the full SHA
    d89f353 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    89c1e87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1222b11 View commit details
    Browse the repository at this point in the history
  4. [chore] benchmark环境升级

    - docker-compose: 所有容器 mem_limit 512m→1024m, 新增 ulimits nofile=65536
    - collect_stats.sh: 尾注从硬编码改为动态读取容器实际内存/nofile限制
    Hical61 committed May 24, 2026
    Configuration menu
    Copy the full SHA
    990427e View commit details
    Browse the repository at this point in the history
  5. [perf] 高并发场景优化:干掉无效syscall、减少堆分配、绑核

    strace 和 perf 火焰图实测发现 10K 并发下几个明显的浪费点,逐一干掉:
    
    1. benchmark 跑着 60s 的 idleTimeout 完全没必要,关掉后每连接省 3 次
       make_shared + 1 个 timer 协程
    2. SocketGuard 析构时无脑 shutdown,99.99% 都失败(对端早断了),
       改成只有正常 keep-alive 结束才 shutdown
    3. coSpawn 的 completion handler 每次都 malloc/free,换成
       recycling_allocator 让 thread_local 缓存兜着
    4. worker 线程没绑核,内核随便迁移导致 TLB flush + 跨核 IPI,
       加上 pthread_setaffinity_np
    5. benchmark 构建开启 mimalloc,干掉 glibc 的 mprotect arena 扩展
    6. 容器启动时配置 RPS/RFS,让收包 softirq 对齐到处理连接的 CPU
    Hical61 committed May 24, 2026
    Configuration menu
    Copy the full SHA
    82c7f97 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2026

  1. [perf] 响应序列化提速:前缀模板干掉每请求3次insert,文件响应cork合包

    keep-alive连接把Server/Connection/Date预拼成一段字节,每个请求
    只做一次memcpy就完事了,不用再反复往HeaderMap里塞再遍历格式化。
    Date每秒刷一次29字节,Connection:close走回退路径(反正也就最后一个请求)。
    
    writeFileResponse加了TcpCorkGuard,先cork住再发head+首块,
    uncork时内核一口气flush出去,省掉一个200字节小包。
    Linux用TCP_CORK,macOS用TCP_NOPUSH,Windows啥也不干。
    Hical61 committed May 25, 2026
    Configuration menu
    Copy the full SHA
    e32ecae View commit details
    Browse the repository at this point in the history
  2. [chore] CI clang-format 版本对齐本地 22.1.2

    修改文件:
    - .github/workflows/ci.yml (22.1.1 → 22.1.2)
    - src/core/HttpResponse.h (TcpCorkGuard 成员命名规范)
    - src/core/HttpSessionImpl.cpp (同上 + clang-format 格式化)
    Hical61 committed May 25, 2026
    Configuration menu
    Copy the full SHA
    87b5642 View commit details
    Browse the repository at this point in the history
Loading