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

fix(file-list): do not preprocess up-to-date files #3196

Merged
merged 1 commit into from
Nov 14, 2018
Merged

fix(file-list): do not preprocess up-to-date files #3196

merged 1 commit into from
Nov 14, 2018

Conversation

segrey
Copy link
Contributor

@segrey segrey commented Oct 30, 2018

It improves performance of "karma run" command which refreshes fileList.

Closes #2829

@segrey
Copy link
Contributor Author

segrey commented Nov 7, 2018

@johnjbarton What do you think about this change? I can add tests if the change is generally OK.

@johnjbarton
Copy link
Contributor

Should we worry that we will perform the check even though the preprocess maybe trivial?
Is every preprocess known to be cached?

@segrey
Copy link
Contributor Author

segrey commented Nov 7, 2018

Should we worry that we will perform the check even though the preprocess maybe trivial?

As I understand, the check is fast enough and shouldn't impact the performance. Also, if I'm not mistaken, fileList.refresh() is called from karma run command only (lib/middleware/runner.js). AFAIK, karma run is not used often when running karma tests manually.

Is every preprocess known to be cached?

Looks like. At least fileList.changeFile(filePath) runs preprocessors for changed files only. It seems OK to preprocess changed files only in fileList.refresh() too.

@johnjbarton
Copy link
Contributor

Ok please see if you can create a test.

It improves performance of "karma run" command which refreshes fileList.

Closes #2829
@segrey
Copy link
Contributor Author

segrey commented Nov 14, 2018

Done, please take a look.

@Havunen
Copy link

Havunen commented Dec 3, 2018

This PR probably broke single entry setups? #3226

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.

3 participants