Skip to content

feat: Improve compile time#1106

Open
dga711 wants to merge 2 commits intotcgdex:masterfrom
dga711:fix/improve-compile-time
Open

feat: Improve compile time#1106
dga711 wants to merge 2 commits intotcgdex:masterfrom
dga711:fix/improve-compile-time

Conversation

@dga711
Copy link

@dga711 dga711 commented Feb 6, 2026

This PR aims to improve to compile times on the current build system by a large amount.
Afaik there is rewrite in progress, but this could still help devs in the meantime.
It might also improve the CI compile times.

Changes

  • Only exec git log once to fill last edits cache
  • Add cache to setToSetSimple
  • Added getCardsLength to cardUtil, which gets cardcount by filesystem
  • setToSetSimple now uses getCardsLength to get card count, instead of expanding whole cardset just to get the number
  • Add timing log after compile is done

Details

Currently the compile can take up to 25 minutes, depending on the setup.
The changes in this PR bring it down to 30-40 seconds.

  • Getting the last edits now runs in a few seconds by only asking for the git log once, instead of for every card. It then finds each cards last edit date in the whole log
  • setToSetSimple called getCards just to get the card count. This process can take many seconds.
  • Added a cache to setToSetSimple because it is called for each processed card, while it is only needed to be done once. Which reduces the time more, even after optimizations
image

Dominik Gallus added 2 commits February 5, 2026 14:06
- Cache simple set
- Base set card length on files not expand whole set
- Only call git log once for last edits
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.

1 participant