# Source Code for puts(..)

**URL:** <https://www.ruby-forum.com/t/source-code-for-puts/189345>\
**Category:** Ruby\
**Created:** [May 29, 2010, 6:55am UTC](https://www.ruby-forum.com/t/source-code-for-puts/189345 "2010-05-29T06:55:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlucci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@dlucci](https://www.ruby-forum.com/u/dlucci)\
**Post date:** [May 29, 2010, 6:55am UTC](https://www.ruby-forum.com/t/source-code-for-puts/189345/1 "2010-05-29T06:55:18Z")

</div>

Dear all,  
I am writing a program that for some reason one of the options takes  
20 seconds to run while the other two combined take 12 seconds. I have  
the problem narrowed down to one line of code that is always run. This  
line executes a shell command via puts(`...`). So, I am convinced the  
reason the program takes so long lies in the puts source. If anyone can  
direct to that, I would be most grateful.

TL;DR: My code is running slowly and I think puts(…) is the reason  
why. Anyone have the source for it?

Cheers,  
dlucci

---

<div class="post-metadata">

**Author:** ![dlucci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee59a6/32.png) [@dlucci](https://www.ruby-forum.com/u/dlucci)\
**Post date:** [May 29, 2010, 11:18am UTC](https://www.ruby-forum.com/t/source-code-for-puts/189345/2 "2010-05-29T11:18:02Z")

</div>

On Sat, May 29, 2010 at 6:55 AM, Derril L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Dear all,  
> I am writing a program that for some reason one of the options takes  
> 20 seconds to run while the other two combined take 12 seconds. I have  
> the problem narrowed down to one line of code that is always run. This  
> line executes a shell command via puts(`...`). So, I am convinced the  
> reason the program takes so long lies in the puts source. If anyone can  
> direct to that, I would be most grateful.  
> I am convinced that the reason lies in the shell command.  
> If you are not, try this  
> p “starting”  
> x = `...`  
> p “end”  
> puts x  
> HTH  
> R.
