Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor glob pattern matching #70

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Refactor glob pattern matching #70

merged 4 commits into from
Dec 16, 2024

Conversation

juraj-hrivnak
Copy link
Owner

@juraj-hrivnak juraj-hrivnak commented Dec 16, 2024

Reduced time complexity from O(n * m^2 * p * 3) to O(n * m * 3) , where:

  • n is the number of glob patterns
  • m is the total number of files and directories in the working path
  • p is the number of export profiles
  • 3 represents the number of times this is called for each type of override (e.g. overrides, server overrides and client overrides)

- Still it's too slow with large modpacks
# Conflicts:
#	src/commonMain/kotlin/teksturepako/pakku/Version.kt
#	src/commonMain/kotlin/teksturepako/pakku/api/data/ConfigFile.kt
@juraj-hrivnak juraj-hrivnak added enhancement Enhancement of an existing feature new feature New feature request labels Dec 16, 2024
@juraj-hrivnak juraj-hrivnak self-assigned this Dec 16, 2024
@juraj-hrivnak juraj-hrivnak merged commit 440d7ff into main Dec 16, 2024
3 checks passed
@juraj-hrivnak juraj-hrivnak deleted the refactor/glob branch December 16, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of an existing feature new feature New feature request
Projects
Status: Done🎉
Development

Successfully merging this pull request may close these issues.

1 participant