pocha / terminal-codelearn

Super fast multi user pseudo bash Terminal in Node.js & SockJS
http://pocha.github.io/terminal-codelearn
80 stars 26 forks source link

The output is really slow to appear #2

Closed pocha closed 11 years ago

pocha commented 11 years ago

The output a command takes a lot of time to appear on the output. Its best that the code (reel-server.rb) should be profiled & time taken by various modules should be dumped in a log file to figure out where the latency is.

To test latency in real-time, siege can be used to send some real-time back to back inputs for different users. Analyzing the log file should point to as what thing took maximum time & then that bottleneck should be worked on.

vireshas commented 11 years ago

Let me write a script to benchmark every def in the reel server.

pocha commented 11 years ago

Its not just defs. I have a feeling that searching for the user in the hash could be time consuming too if the hash has too many users. But yes - get started first.

csaurav commented 11 years ago

@pocha Pushed in initial code for the ruby-profiler. Have a look and let me know.

pocha commented 11 years ago

The profiling looks good. Can you please add where the values would be dumped.

Also - is it possible to include the delay from the intermediate Rails app in the dump.

On 24-Apr-2013, at 8:24 PM, Saurav wrote:

@pocha Pushed in initial code for the ruby-profiler. Have a look and let me know.

? Reply to this email directly or view it on GitHub.

csaurav commented 11 years ago

the profile values with get dumped inside "reel_server_profiler.log" file. The file will be created inside session/sample/ directory, once the code gets executed.

@pocha I will look into the details about what you had mentioned earlier in the mail and get back to you by tomorrow.

pocha commented 11 years ago

Sounds good @csaurav . Append details in README as profiling data. That will help gathering feedback from other experts as to where to improve the performance.

pocha commented 11 years ago

I have removed @vireshas from the issue/milestone. I will assign the issue to the person who is able to put down the profiling data (preferably end to end)

csaurav commented 11 years ago

@vireshas, as discussed yesterday, have pushed in the profiler log file for your reference e28dbdd

@pocha, I will add the details in the README soon, bit tied up now.