Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

fix: improve git files generator performance #355

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Aug 26, 2021

Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com

Closes #354

PR changes repo services implementation: replaces GetFilePaths and GetFileContent methods with GetFiles that checkout/fetch repo once and return content of discovered files.

@alexmt alexmt requested a review from jgwest August 26, 2021 05:03
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt force-pushed the 354-file-generator-performance branch from 36d8557 to 74e5561 Compare August 26, 2021 21:09
Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @alexmt! The only minor disadvantage to this approach is it will read the full file contents of matching paths into memory (causing spiky heap allocation) but since it will only read files that match the path (which tend to be smallish .json and .yaml files), this is perfectly fine.

@jgwest jgwest merged commit 34a1bbe into argoproj:master Aug 31, 2021
@alexmt alexmt deleted the 354-file-generator-performance branch August 31, 2021 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The git files generator is slow
2 participants