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

Performance - start up - Can haste-map do less if you don't --changedSince ? #10301

Closed
lukeapage opened this issue Jul 22, 2020 · 7 comments
Closed

Comments

@lukeapage
Copy link
Contributor

🚀 Feature Proposal

When you start jest to run all specs or with a filter, jest does not need the full mapping information required for --changedSince but it seems it still generates it. This leads to a noticable delay between running jest and the specs being run. On our build server if that server hasn't seen the repo in a while, we can have tests that take 40seconds to run, but jest as a whole takes 160seconds.

I think this affects our codebase because its pretty large - I expect on small and medium sized projects this might not be noticable.

I guess you need to still look for files, so it could be that haste map takes options as to how much information is needed for the particular jest run.

Pitch

Because Jest should be fast :)

@beckerei
Copy link

Do you think this is a feature request or rather a bug?

We are seeing similar performance penalties as you described when executing jest locally. It's really hard to get a hold on why the startup time for tests is so slow.

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@revmischa
Copy link

I don't know what haste map is but it sure makes jest take a long time to run a test. Anything I can do to make things go faster?

Screen Shot 2022-03-10 at 19 08 06

@github-actions github-actions bot removed the Stale label Mar 10, 2022
@SimenB
Copy link
Member

SimenB commented Mar 11, 2022

Hard to say without an example repository. It's probably an issue with ignore patterns. Running jest --list-tests is a good test. It should essentially just crawl all files, which should be quite quick (as it should e.g. not crawl node_modules)

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 11, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 10, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants