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

Slow build time in Windows environment #1294

Closed
wrenoud opened this issue Jul 6, 2014 · 10 comments
Closed

Slow build time in Windows environment #1294

wrenoud opened this issue Jul 6, 2014 · 10 comments

Comments

@wrenoud
Copy link

wrenoud commented Jul 6, 2014

This is pertinent to Issue #538 but that has been closed to open comment. I wanted to share a partial fix that seems obvious but only just struck me.

I have Microsoft Security Essentials running Real-time protection. This includes process monitoring. I added node.exe to the Excluded processes and have seen a drastic improvement in the build times.

Before:

Build successful - 13126ms.

Slowest Trees                  | Total
-------------------------------+----------------
TreeMerger (vendor)            | 3154ms
TreeMerger (stylesAndVendor)   | 2051ms
TreeMerger (appAndDependencies) | 1914ms
StaticCompiler                 | 1791ms

After:

Build successful - 4479ms.

Slowest Trees                  | Total
-------------------------------+----------------
TreeMerger (appAndDependencies) | 881ms
TreeMerger (stylesAndVendor)   | 639ms
StaticCompiler                 | 582ms
TreeMerger (vendor)            | 564ms
ES3SafeFilter                  | 282ms
JSHint - Tests                 | 251ms

Still not optimal, but definitely not an ember-cli problem. Might be worth noting in the documentation to disable process monitoring if people are seeing slow build times in Windows environments.

@stefanpenner
Copy link
Contributor

@wrenoud thanks for the info. Although not ideal, do you see a different approach ?

@rjackson i wonder if is the missing peace for windows perf in your latest batch of improvements.

@ccoenen
Copy link
Contributor

ccoenen commented Jul 7, 2014

As an additional tip i'd suggest excluding (at least) /tmp from windows search index locations.

@ccoenen
Copy link
Contributor

ccoenen commented Jul 7, 2014

As another data point: My speed-up disabling Windows Defender (Win8) with ember-cli 0.0.39:

With Windows Defender:

Build successful - 9001ms.
... Reload LiveReload files ...

Slowest Trees                  | Total
-------------------------------+----------------
TreeMerger (appAndDependencies) | 1432ms
StaticCompiler                 | 1427ms
TreeMerger (stylesAndVendor)   | 1384ms
TreeMerger (vendor)            | 1346ms
ES3SafeFilter                  | 508ms

Without Defender:

Build successful - 3919ms.
... Reload LiveReload files ...

Slowest Trees                  | Total
-------------------------------+----------------
TreeMerger (appAndDependencies) | 836ms
StaticCompiler                 | 753ms
TreeMerger (vendor)            | 619ms
TreeMerger (stylesAndVendor)   | 606ms

Here's how to disable it on windows 8 just for node:

  • Hit your Windows Key, then start typing "defen" which should bring up "Defender as first result". Start it.
  • In Windows Defender, Choose the Settings Tab, Then the "excluded processes" Line. (screenshot calls it "Ausgeschlossene Prozesse")
  • Click "Browse" (first button on the right, screenshot says "Durchsuchen")
  • Navigate to your node installation, which is usually in C:\Program Files\nodejs\node.exe
  • Click OK
  • Click "Add" (Second button, screenshot says "Hinzufügen")
  • Clich "Save changes" (Left button at the bottom, screenshot says "Änderungen speichern")

win-defender-process

Here's how to disable it for just one directory:

  • Hit your Windows Key, then start typing "defen" which should bring up "Defender as first result". Start it.
  • In Windows Defender, Choose the Settings Tab, Then the "excluded files and directories" Line. (screenshot says "Ausgeschlossene Dateien und Sp...")
  • Click "Browse" (first button on the right, screenshot says "Durchsuchen")
  • Navigate to your project's tmp dir. While you can exclude more, i personally go with /tmp, only. Choose wisely ;-)
  • Click OK
  • Click "Add" (Second button, screenshot says "Hinzufügen")
  • Clich "Save changes" (Left button at the bottom, screenshot says "Änderungen speichern")

win-defender-dir

@ccoenen
Copy link
Contributor

ccoenen commented Jul 7, 2014

How to disable Windows Search Indexing

(On Win 8; Win 7 might be different)

  • Hit Win+X, Then choose control Panel
  • Look for (or type it into the search field) "Indexing Options" (Screenshot says "Indizierungsoptionen")
  • Select the location that will most likely contain your project. Mine is below "User" (Screenshot: "Benutzer")
  • Click "Change" or "Edit" (Screenshot: "Ändern")
  • This brings up a directory tree with checkboxes. Navigate to your project dir and remove the checkbox for /tmp or anywhere else you'd like.
  • Click OK

search-index

@stefanpenner
Copy link
Contributor

@ccoenen this info is quite valuable, can you submit it as a PR to the website?

@wrenoud
Copy link
Author

wrenoud commented Jul 7, 2014

Thanks @ccoenen! You hit all the points. I too saw an improvement removing the tmp folder from seach indexing.

I also realized after posting that adding tmp to the exclusions also worked, which seems a little safer that excluding node.exe, which effectively white-lists any .js files.

@wrenoud
Copy link
Author

wrenoud commented Jul 7, 2014

I can get some windows 7 screenshots later today for documentation if that's of help.

@gzurbach
Copy link

Thanks for the suggestion. I saved 8 seconds (out of 17) by adding node.exe and ./tmp to the excluded scanned processes/paths. My laptop has System Center Enpoint Protection, similar to Windows Defender.

@ccoenen
Copy link
Contributor

ccoenen commented Jul 14, 2014

@wrenoud, if you have an english version of windows, that would be great! Feel free to add them to #1302.

@stefanpenner
Copy link
Contributor

this has been added to the website, further perf work will likely be in broccoli land

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

No branches or pull requests

4 participants