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

Process out of memory #38

Closed
miparnisari opened this issue Jun 7, 2016 · 3 comments
Closed

Process out of memory #38

miparnisari opened this issue Jun 7, 2016 · 3 comments

Comments

@miparnisari
Copy link

miparnisari commented Jun 7, 2016

I have a Windows 10 machine with 8 gb of RAM. First time I run jsinspect in one of my projects and I get this:

$ jsinspect
[
<--- Last few GCs --->

  208383 ms: Scavenge 1402.4 (1457.2) -> 1402.4 (1457.2) MB, 15.8 / 0 ms (+ 2.0 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
  210220 ms: Mark-sweep 1402.4 (1457.2) -> 1401.4 (1456.2) MB, 1836.9 / 0 ms (+ 4.0 ms in 2 steps since start of marking, biggest step 2.0 ms) [last resort gc].
  211992 ms: Mark-sweep 1401.4 (1456.2) -> 1400.9 (1457.2) MB, 1771.8 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 000003A02DCB4639 <JS Object>
    1: finishNode [C:\Users\miparnisari\AppData\Roaming\npm\node_modules\jsinspect\node_modules\acorn\dist\acorn_loose.js:~647] [pc=00000259F86AE55F] (this=000001850C2CBAB1 <a LooseParser with map 0000035629E4CA89>,node=0000010720CDDF69 <a Node with map 0000035629E4D6E9>,type=000000B68F9CC089 <String[16]: MemberExpression>)
    2: parseSubscripts [C:\Users\miparnisari\AppData\Roaming\npm\node...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

I am using these settings:

{
  "threshold":     30,
  "identifiers":   true,
  "matches":       3,
  "ignore":        "Test.js|Spec.js",
  "jsx":           false,
  "reporter":      "json",
  "suppress":      100
}

EDIT: I used WindDirStat to know how many JS files there are: 23,540. It's a lot but I'm assuming that we are not scanning the files within .git or node_modules, right?

@danielstjules
Copy link
Owner

Sorry for the late reply! Looks like it's throwing while the underlying js parser (acorn) is running. Number of files probably isn't the best indicator though - would you happen to know the total dir filesize?

@miparnisari
Copy link
Author

Hey, no, sorry, this was a long time ago and I don't even remeber what project it was :(

@danielstjules
Copy link
Owner

No worries! :) Closing for now then.

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

2 participants