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

handle very large samples #28

Closed
davidmarkclements opened this issue Apr 5, 2016 · 1 comment
Closed

handle very large samples #28

davidmarkclements opened this issue Apr 5, 2016 · 1 comment

Comments

@davidmarkclements
Copy link
Owner

#27 shows that after a certain amount of samples two things are going to happen

  1. browserify is going to explode with max call stack error
  2. something in flamer.js is going to blow the stack in the browser (again so many samples) once we get past the problem in 1

There's two approaches we can take

  1. avoid blowing the stack - this will require a altering flamer.js (possibly sticking in a setTimeout or something, or failing that rewriting procedural style) and altering browserify (kinda super out of scope, but we may be able to tweak something, again with a setTimeout)
  2. when the stack is blown, instruct the user to retry with the --large-sample flag, this will:
    a. set the --stack-size flag via require('v8').setFlagsFromString (assuming stack-size is supported otherwise we'll have to spawn a sub process which adds complexity)
    b. print out useful command to open flamgegraph in chrome with --js-flags "--stack-size 8024"
@davidmarkclements
Copy link
Owner Author

also investigate stack folding that might give us more leeway here too (although we'd still want to handle case where even folded stacks blow the stack)

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

1 participant