Skip to content

Fix slow push#1392

Merged
christian-schilling merged 1 commit into
masterfrom
@changes/master/christian.schilling.de@gmail.com/fix-slow-push
Sep 24, 2024
Merged

Fix slow push#1392
christian-schilling merged 1 commit into
masterfrom
@changes/master/christian.schilling.de@gmail.com/fix-slow-push

Conversation

@christian-schilling

Copy link
Copy Markdown
Member

To determine which files are part of a filtered subset, regardless of their potentially changed path a trick is used: The filter is applied and then the inverted filter is applied to the result.
The implementation of that trick was to simply chain the filter with the inverted one. However this caused flatten() to create a hughe intermediate representation (something like a cartesian product) that then has to be simplified down again by optimize()/simplify(). While that worked, it was very computationally expensive making push extremly slow in some cases.
Now instead of chaining apply() is called twice, avoiding the huge intermediate representation and thus expensive optimization.

Change: fix-slow-push

To determine which files are part of a filtered subset,
regardless of their potentially changed path a trick is used:
The filter is applied and then the inverted filter is applied
to the result.
The implementation of that trick was to simply chain the filter
with the inverted one. However this caused flatten() to create
a hughe intermediate representation (something like a cartesian product)
that then has to be simplified down again by optimize()/simplify().
While that worked, it was very computationally expensive making
push extremly slow in some cases.
Now instead of chaining apply() is called twice, avoiding the
huge intermediate representation and thus expensive optimization.

Change: fix-slow-push
@christian-schilling christian-schilling merged commit 7bc2eec into master Sep 24, 2024
@christian-schilling christian-schilling deleted the @changes/master/christian.schilling.de@gmail.com/fix-slow-push branch September 24, 2024 15:25
christian-schilling added a commit that referenced this pull request Oct 11, 2025
To determine which files are part of a filtered subset,
regardless of their potentially changed path a trick is used:
The filter is applied and then the inverted filter is applied
to the result.
The implementation of that trick was to simply chain the filter
with the inverted one. However this caused flatten() to create
a hughe intermediate representation (something like a cartesian product)
that then has to be simplified down again by optimize()/simplify().
While that worked, it was very computationally expensive making
push extremly slow in some cases.
Now instead of chaining apply() is called twice, avoiding the
huge intermediate representation and thus expensive optimization.

Change: fix-slow-push
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.

2 participants