Skip to content

What CMake options does pygit2 use to build libgit2? #1383

@timxx

Description

@timxx

Hi,

I tried building libgit2 from the latest tag v1.9.1 on Windows using the following CMake options:

-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF

The resulting git2.dll binary size is 1,672 KB.

However, the git2.dll packaged with pygit2 is 4,329 KB. While the size difference is not a major concern, I noticed a significant performance improvement when I replaced the pygit2-provided git2.dll with my own build:
The Repository.walk operation time dropped from about 9 seconds to ~4 seconds.

Questions:

  1. What CMake options does pygit2 use to build its bundled libgit2?
  2. Why might there be such a difference in binary size and performance between the two builds?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions