Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can have a look at <a href="https://github.com/nodejitsu/node-http-proxy" rel="nofollow">node-http-proxy</a> module and how it handles the connections. Make sure you don't buffer any data and everything works by <a href="https://github.com/substack/stream-handbook" rel="nofollow">streaming</a>. And you should try to see where is the time spent for those long requests. Try instrumenting parts of your code with <a href="http://nodejs.org/docs/latest/api/all.html#all_console_time_label" rel="nofollow"><code>conosle.time</code></a> and <a href="http://nodejs.org/docs/latest/api/all.html#all_console_timeend_label" rel="nofollow"><code>console.timeEnd</code></a> and see where is taking the most time. If the time is mostly spent in javascript you should try to profile it. Basically you can use v8 profiler, by adding --prof option to your node command. Which makes a <a href="http://code.google.com/p/v8/wiki/V8Profiler#Process_the_Generated_Output" rel="nofollow">v8.log</a> and can be processed via a <a href="http://code.google.com/p/v8/wiki/V8Profiler#Process_the_Generated_Output" rel="nofollow">v8 tool found in node-source-dir/deps/v8/tools</a>. It only works if you have installed d8 shell via <a href="http://www.scons.org/" rel="nofollow">scons</a>(scons d8). You can have a look at <a href="http://blog.arc90.com/2012/03/05/profiling-node-programs-on-mac-os-x/" rel="nofollow">this article</a> to help you further to make this working.</p> <p>You can also use <a href="https://github.com/c4milo/node-webkit-agent" rel="nofollow">node-webkit-agent</a> which uses webkit developer tools to show the profiler result. You can also have a look at <a href="https://github.com/alfred-nsh/node-webkit-agent" rel="nofollow">my fork</a> with a bit of sugar.</p> <p>If that didn't work, you can try <a href="http://blog.nodejs.org/2012/04/25/profiling-node-js/" rel="nofollow">profiling with dtrace</a>(only works in illumos-based systems like SmartOS).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload