git-native-issue icon indicating copy to clipboard operation
git-native-issue copied to clipboard

Performance testing with large repositories

Open remenoscodes opened this issue 9 months ago • 1 comments

Test git-native-issue performance with repositories containing:

  • 1000+ issues
  • Deep comment threads (100+ comments per issue)
  • Large binary attachments
  • Complex merge scenarios

Identify bottlenecks and optimization opportunities.

Benchmarks to measure:

  • Import time
  • Export time
  • Search performance
  • ls/show command latency

remenoscodes avatar Feb 20 '26 00:02 remenoscodes

I originally decided to do some performance testing by pulling down and trying to import issues from the main GitLab repository. It is enormous: ~48,500 open issues and ~306,000 total issues. I quickly ran into limits on how many issues/updates that could be pulled across the API, capping out at about 110 issues. I then took a different approach. I created an empty repository and tried two different brute force problems: a repository with lots of issues to simulate large issue count performance, a repository with few issues but lots of state changes to simulate deep issue processing performance. I'm running these tests on an Apple M5 MacBook Air.

For the first I wrote a script that incrementally added 100 issues at a time that are simply new issues with titles. I then looked at how long it took to do a git issue ls. For the second I started with a repo of 10 issues that were simply new issues with titles. I then wrote a script that incrementally added 100 close/open state changes to each one. Timings were done by doing the command:

time git issue ls | wc -l

In both cases the processing time of ls increased linearly. For the deep issue case even when there are 1000 updates per issue the processing time is reasonable at less than 1 second. For the large number of issues case however the processing time quickly becomes too large. It's adding about 0.67 seconds per 100 issues. So by the time you get to 1000 issues it was taking 6.7 seconds to do the ls, at 2000 issues 13.4 seconds, and at 3000 issues 20.1 seconds. Assuming things continue on that linear curve an ls of the GitLab repo of 306,000 issues would take about 35 minutes. Granted for these very large issue count cases there is a bit of a UX issue of always needing to list the entire thing versus having something akin to paging, simple metrics, etc besides piping to other tools (which his how I've been doing it so far).

I have more limited testing data on git search but for the record the search in the many issues repo with 3000 issues seemed to operate about twice as fast as ls did. On the deep issue repo it had comparable speed to ls.

Another data point is on storage. Again, these are empty repos that are solely storing issues. For the repository with 3000 title only issues the total disk usage was 24 MB. For the repository with 10 issues each with 1000 state changes the total disk usage was 39 MB. Again looking at the GitLab repo as an extreme example, that'd probably put the storage requirement for its issues at at least ~2.5 GB.

HankG avatar Oct 19 '26 14:10 HankG