librelist archives

« back to archive

Nesta/Shotgun really slow, 20+ seconds to render

Nesta/Shotgun really slow, 20+ seconds to render

From:
Thomas Klokosch
Date:
2012-05-05 @ 20:25
Hi,

I'm new to Nesta and have only limited experience with ruby environments.
I followed the quickstart guide on the Nesta site, it all works, but every
page needs around 20+ seconds to render.
All the required Gems are installed, I'm using a speparate RVM gemset for 
that and tried both webrick and thin to serve the files, always gets me 
the same results.
I tried digging deeper into it with the shotgun -d debug parameter, it 
gives me quite a few exceptions in various gems, including nesta & psych.
But I'm not even sure that's related since the website generates just 
fine. I know shotgun always reloads everything, opposed to other tools, 
but I guess 20+ seconds is a bit odd...

I'm on a current generation MBA with i7, Lion.
Would be great if someone had any advice on how to debug this.

Thanks,
Thomas

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Brian Gonzalez
Date:
2012-05-05 @ 20:35
Thomas,

Try this instead of "shotgun config.ru":

   thin -R config.ru

Brian Gonzalez

On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch <thomas.klokosch@me.com>wrote:

> Hi,
>
> I'm new to Nesta and have only limited experience with ruby environments.
> I followed the quickstart guide on the Nesta site, it all works, but every
> page needs around 20+ seconds to render.
> All the required Gems are installed, I'm using a speparate RVM gemset for
> that and tried both webrick and thin to serve the files, always gets me the
> same results.
> I tried digging deeper into it with the shotgun -d debug parameter, it
> gives me quite a few exceptions in various gems, including nesta & psych.
> But I'm not even sure that's related since the website generates just
> fine. I know shotgun always reloads everything, opposed to other tools, but
> I guess 20+ seconds is a bit odd...
>
> I'm on a current generation MBA with i7, Lion.
> Would be great if someone had any advice on how to debug this.
>
> Thanks,
> Thomas
>
>

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Thomas Klokosch
Date:
2012-05-05 @ 20:45
Hi Brian,

'thin -R config.ru' gives me: 
Command required

Usage: thin [options] start|stop|restart|config

(thin 1.3.1 codename Triple Espresso)
btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head

Thomas 

--
Thomas Klokosch
thomas.klokosch@me.com (mailto:thomas.klokosch@me.com)
http://www.controlledrandom.com/

Hauptstr. 4
10827 Berlin

Phone +49 151 156 74 912
Skype thomas.klokosch
Twitter @thomasklokosch



On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:

> Thomas, 
> 
> Try this instead of "shotgun config.ru (http://config.ru)":
> 
> thin -R config.ru (http://config.ru) 
> 
> Brian Gonzalez 
> 
> On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch <thomas.klokosch@me.com 
(mailto:thomas.klokosch@me.com)> wrote:
> > Hi,
> > 
> > I'm new to Nesta and have only limited experience with ruby environments.
> > I followed the quickstart guide on the Nesta site, it all works, but 
every page needs around 20+ seconds to render.
> > All the required Gems are installed, I'm using a speparate RVM gemset 
for that and tried both webrick and thin to serve the files, always gets 
me the same results.
> > I tried digging deeper into it with the shotgun -d debug parameter, it
gives me quite a few exceptions in various gems, including nesta & psych.
> > But I'm not even sure that's related since the website generates just 
fine. I know shotgun always reloads everything, opposed to other tools, 
but I guess 20+ seconds is a bit odd...
> > 
> > I'm on a current generation MBA with i7, Lion.
> > Would be great if someone had any advice on how to debug this.
> > 
> > Thanks,
> > Thomas
> 


Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Brian Gonzalez
Date:
2012-05-05 @ 20:46
Oops, "thin start -R config.ru"

On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch <thomas.klokosch@me.com>wrote:

> Hi Brian,
>
> 'thin -R config.ru' gives me:
> Command required
>
> Usage: thin [options] start|stop|restart|config
>
> (thin 1.3.1 codename Triple Espresso)
> btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
>
> Thomas
>
> --
> Thomas Klokosch
> thomas.klokosch@me.com (mailto:thomas.klokosch@me.com)
> http://www.controlledrandom.com/
>
> Hauptstr. 4
> 10827 Berlin
>
> Phone +49 151 156 74 912
> Skype thomas.klokosch
> Twitter @thomasklokosch
>
>
>
> On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
>
> > Thomas,
> >
> > Try this instead of "shotgun config.ru (http://config.ru)":
> >
> > thin -R config.ru (http://config.ru)
> >
> > Brian Gonzalez
> >
> > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com(mailto:
> thomas.klokosch@me.com)> wrote:
> > > Hi,
> > >
> > > I'm new to Nesta and have only limited experience with ruby
> environments.
> > > I followed the quickstart guide on the Nesta site, it all works, but
> every page needs around 20+ seconds to render.
> > > All the required Gems are installed, I'm using a speparate RVM gemset
> for that and tried both webrick and thin to serve the files, always gets me
> the same results.
> > > I tried digging deeper into it with the shotgun -d debug parameter, it
> gives me quite a few exceptions in various gems, including nesta & psych.
> > > But I'm not even sure that's related since the website generates just
> fine. I know shotgun always reloads everything, opposed to other tools, but
> I guess 20+ seconds is a bit odd...
> > >
> > > I'm on a current generation MBA with i7, Lion.
> > > Would be great if someone had any advice on how to debug this.
> > >
> > > Thanks,
> > > Thomas
> >
>
>
>
>

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Thomas Klokosch
Date:
2012-05-05 @ 20:51
It does start but it's still slow, like before. 

On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote: 
> Oops, "thin start -R config.ru (http://config.ru)"
> 
> On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch <thomas.klokosch@me.com 
(mailto:thomas.klokosch@me.com)> wrote:
> > Hi Brian,
> > 
> > 'thin -R config.ru (http://config.ru)' gives me:
> > Command required
> > 
> > Usage: thin [options] start|stop|restart|config
> > 
> > (thin 1.3.1 codename Triple Espresso)
> > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
> > 
> > Thomas
> > 
> > --
> > Thomas Klokosch
> > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)
> > http://www.controlledrandom.com/
> > 
> > Hauptstr. 4
> > 10827 Berlin
> > 
> > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912)
> > Skype thomas.klokosch
> > Twitter @thomasklokosch
> > 
> > 
> > 
> > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
> > 
> > > Thomas,
> > > 
> > > Try this instead of "shotgun config.ru (http://config.ru) 
(http://config.ru)":
> > > 
> > > thin -R config.ru (http://config.ru) (http://config.ru)
> > > 
> > > Brian Gonzalez
> > > 
> > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)> wrote:
> > > > Hi,
> > > > 
> > > > I'm new to Nesta and have only limited experience with ruby environments.
> > > > I followed the quickstart guide on the Nesta site, it all works, 
but every page needs around 20+ seconds to render.
> > > > All the required Gems are installed, I'm using a speparate RVM 
gemset for that and tried both webrick and thin to serve the files, always
gets me the same results.
> > > > I tried digging deeper into it with the shotgun -d debug 
parameter, it gives me quite a few exceptions in various gems, including 
nesta & psych.
> > > > But I'm not even sure that's related since the website generates 
just fine. I know shotgun always reloads everything, opposed to other 
tools, but I guess 20+ seconds is a bit odd...
> > > > 
> > > > I'm on a current generation MBA with i7, Lion.
> > > > Would be great if someone had any advice on how to debug this.
> > > > 
> > > > Thanks,
> > > > Thomas
> > > 
> > 
> 


Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Brian Gonzalez
Date:
2012-05-05 @ 20:53
You might also want to try setting "cache:true" in config/config.yml. This
will ensure your files aren't rendered every single time.

On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch <thomas.klokosch@me.com>wrote:

> It does start but it's still slow, like before.
>
> On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
> > Oops, "thin start -R config.ru (http://config.ru)"
> >
> > On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com(mailto:
> thomas.klokosch@me.com)> wrote:
> > > Hi Brian,
> > >
> > > 'thin -R config.ru (http://config.ru)' gives me:
> > > Command required
> > >
> > > Usage: thin [options] start|stop|restart|config
> > >
> > > (thin 1.3.1 codename Triple Espresso)
> > > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
> > >
> > > Thomas
> > >
> > > --
> > > Thomas Klokosch
> > > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) (mailto:
> thomas.klokosch@me.com)
> > > http://www.controlledrandom.com/
> > >
> > > Hauptstr. 4
> > > 10827 Berlin
> > >
> > > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912)
> > > Skype thomas.klokosch
> > > Twitter @thomasklokosch
> > >
> > >
> > >
> > > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
> > >
> > > > Thomas,
> > > >
> > > > Try this instead of "shotgun config.ru (http://config.ru) (
> http://config.ru)":
> > > >
> > > > thin -R config.ru (http://config.ru) (http://config.ru)
> > > >
> > > > Brian Gonzalez
> > > >
> > > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch <
> thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) (mailto:
> thomas.klokosch@me.com)> wrote:
> > > > > Hi,
> > > > >
> > > > > I'm new to Nesta and have only limited experience with ruby
> environments.
> > > > > I followed the quickstart guide on the Nesta site, it all works,
> but every page needs around 20+ seconds to render.
> > > > > All the required Gems are installed, I'm using a speparate RVM
> gemset for that and tried both webrick and thin to serve the files, always
> gets me the same results.
> > > > > I tried digging deeper into it with the shotgun -d debug
> parameter, it gives me quite a few exceptions in various gems, including
> nesta & psych.
> > > > > But I'm not even sure that's related since the website generates
> just fine. I know shotgun always reloads everything, opposed to other
> tools, but I guess 20+ seconds is a bit odd...
> > > > >
> > > > > I'm on a current generation MBA with i7, Lion.
> > > > > Would be great if someone had any advice on how to debug this.
> > > > >
> > > > > Thanks,
> > > > > Thomas
> > > >
> > >
> >
>
>
>
>

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Max Sadrieh
Date:
2012-05-05 @ 21:02
Even if it's reprocessed every time, it shouldn't take 20 seconds.

What format are you using? Can you start another app with thin to see how 
much time it takes? What about a static website with Apache or nginx or 
lighttpd? What's your CPU usage, RAM usage, etc. and what's thin's share 
of these when it's responding to a request?

If necessary, you can modify nesta and return a simple string, to see if 
it's nesta or something else.



On May 5, 2012, at 4:53 PM, Brian Gonzalez <me@briangonzalez.org> wrote:

> You might also want to try setting "cache:true" in config/config.yml. 
This will ensure your files aren't rendered every single time.
> 
> On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch <thomas.klokosch@me.com> wrote:
> It does start but it's still slow, like before.
> 
> On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
> > Oops, "thin start -R config.ru (http://config.ru)"
> >
> > On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com)> wrote:
> > > Hi Brian,
> > >
> > > 'thin -R config.ru (http://config.ru)' gives me:
> > > Command required
> > >
> > > Usage: thin [options] start|stop|restart|config
> > >
> > > (thin 1.3.1 codename Triple Espresso)
> > > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
> > >
> > > Thomas
> > >
> > > --
> > > Thomas Klokosch
> > > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)
> > > http://www.controlledrandom.com/
> > >
> > > Hauptstr. 4
> > > 10827 Berlin
> > >
> > > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912)
> > > Skype thomas.klokosch
> > > Twitter @thomasklokosch
> > >
> > >
> > >
> > > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
> > >
> > > > Thomas,
> > > >
> > > > Try this instead of "shotgun config.ru (http://config.ru) 
(http://config.ru)":
> > > >
> > > > thin -R config.ru (http://config.ru) (http://config.ru)
> > > >
> > > > Brian Gonzalez
> > > >
> > > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)> wrote:
> > > > > Hi,
> > > > >
> > > > > I'm new to Nesta and have only limited experience with ruby 
environments.
> > > > > I followed the quickstart guide on the Nesta site, it all works,
but every page needs around 20+ seconds to render.
> > > > > All the required Gems are installed, I'm using a speparate RVM 
gemset for that and tried both webrick and thin to serve the files, always
gets me the same results.
> > > > > I tried digging deeper into it with the shotgun -d debug 
parameter, it gives me quite a few exceptions in various gems, including 
nesta & psych.
> > > > > But I'm not even sure that's related since the website generates
just fine. I know shotgun always reloads everything, opposed to other 
tools, but I guess 20+ seconds is a bit odd...
> > > > >
> > > > > I'm on a current generation MBA with i7, Lion.
> > > > > Would be great if someone had any advice on how to debug this.
> > > > >
> > > > > Thanks,
> > > > > Thomas
> > > >
> > >
> >
> 
> 
> 
> 

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
David Long
Date:
2012-05-05 @ 21:09
I found that shotgun was very slow when I would code on my little netbook
with an atom processor. It is just that processors like that aren't meant
for ruby processing in my opinion.

sent from my Android smart phone
On May 5, 2012 5:03 PM, "Max Sadrieh" <max.sadrieh@gmail.com> wrote:

> Even if it's reprocessed every time, it shouldn't take 20 seconds.
>
> What format are you using? Can you start another app with thin to see how
> much time it takes? What about a static website with Apache or nginx or
> lighttpd? What's your CPU usage, RAM usage, etc. and what's thin's share of
> these when it's responding to a request?
>
> If necessary, you can modify nesta and return a simple string, to see if
> it's nesta or something else.
>
>
>
> On May 5, 2012, at 4:53 PM, Brian Gonzalez <me@briangonzalez.org> wrote:
>
> You might also want to try setting "cache:true" in config/config.yml. This
> will ensure your files aren't rendered every single time.
>
> On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch <thomas.klokosch@me.com>wrote:
>
>> It does start but it's still slow, like before.
>>
>> On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
>> > Oops, "thin start -R config.ru (http://config.ru)"
>> >
>> > On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com(mailto:
>> thomas.klokosch@me.com)> wrote:
>> > > Hi Brian,
>> > >
>> > > 'thin -R config.ru (http://config.ru)' gives me:
>> > > Command required
>> > >
>> > > Usage: thin [options] start|stop|restart|config
>> > >
>> > > (thin 1.3.1 codename Triple Espresso)
>> > > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
>> > >
>> > > Thomas
>> > >
>> > > --
>> > > Thomas Klokosch
>> > > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) (mailto:
>> thomas.klokosch@me.com)
>> > > http://www.controlledrandom.com/
>> > >
>> > > Hauptstr. 4
>> > > 10827 Berlin
>> > >
>> > > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912)
>> > > Skype thomas.klokosch
>> > > Twitter @thomasklokosch
>> > >
>> > >
>> > >
>> > > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
>> > >
>> > > > Thomas,
>> > > >
>> > > > Try this instead of "shotgun config.ru (http://config.ru) (
>> http://config.ru)":
>> > > >
>> > > > thin -R config.ru (http://config.ru) (http://config.ru)
>> > > >
>> > > > Brian Gonzalez
>> > > >
>> > > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch <
>> thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) (mailto:
>> thomas.klokosch@me.com)> wrote:
>> > > > > Hi,
>> > > > >
>> > > > > I'm new to Nesta and have only limited experience with ruby
>> environments.
>> > > > > I followed the quickstart guide on the Nesta site, it all works,
>> but every page needs around 20+ seconds to render.
>> > > > > All the required Gems are installed, I'm using a speparate RVM
>> gemset for that and tried both webrick and thin to serve the files, always
>> gets me the same results.
>> > > > > I tried digging deeper into it with the shotgun -d debug
>> parameter, it gives me quite a few exceptions in various gems, including
>> nesta & psych.
>> > > > > But I'm not even sure that's related since the website generates
>> just fine. I know shotgun always reloads everything, opposed to other
>> tools, but I guess 20+ seconds is a bit odd...
>> > > > >
>> > > > > I'm on a current generation MBA with i7, Lion.
>> > > > > Would be great if someone had any advice on how to debug this.
>> > > > >
>> > > > > Thanks,
>> > > > > Thomas
>> > > >
>> > >
>> >
>>
>>
>>
>>
>

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Thomas Klokosch
Date:
2012-05-05 @ 21:36
I just started thin with a basic 'hello world' sinatra app and it responds
very fast. 

And if I read my iStatMenus correctly, a request to the Nesta demo page 
runs at all 4 cores averaged around 66% idle, with the Ruby/Nesta process 
taking up 99% of the active CPU usage.
I also just restarted my computer, but no effect. 

When I start Nesta with the cache:true configuration, I run into the 
caching issue that is described here in the archive.

While running Nesta through shotgun -d, I get a lot of messages on the 
console, among them:

Exception `Nesta::MetadataParseError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/models.rb:130
- Nesta::MetadataParseError
Exception `LoadError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:108
- no such file to load -- redcarpet
Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/navigation.rb:26
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>
Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/haml-3.1.4/lib/haml/helpers.rb:340
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>






On Saturday, May 5, 2012 at 11:02 PM, Max Sadrieh wrote:

> Even if it's reprocessed every time, it shouldn't take 20 seconds.
> 
> What format are you using? Can you start another app with thin to see 
how much time it takes? What about a static website with Apache or nginx 
or lighttpd? What's your CPU usage, RAM usage, etc. and what's thin's 
share of these when it's responding to a request?
> 
> If necessary, you can modify nesta and return a simple string, to see if
it's nesta or something else.
> 
> 
> 
> On May 5, 2012, at 4:53 PM, Brian Gonzalez <me@briangonzalez.org 
(mailto:me@briangonzalez.org)> wrote:
> 
> > You might also want to try setting "cache:true" in config/config.yml. 
This will ensure your files aren't rendered every single time.
> > 
> > On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch <thomas.klokosch@me.com (mail
> to:thomas.klokosch@me.com)> wrote:
> > > It does start but it's still slow, like before.
> > > 
> > > On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
> > > > Oops, "thin start -R config.ru (http://config.ru) (http://config.ru)"
> > > > 
> > > > On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)> wrote:
> > > > > Hi Brian,
> > > > > 
> > > > > 'thin -R config.ru (http://config.ru) (http://config.ru)' gives me:
> > > > > Command required
> > > > > 
> > > > > Usage: thin [options] start|stop|restart|config
> > > > > 
> > > > > (thin 1.3.1 codename Triple Espresso)
> > > > > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
> > > > > 
> > > > > Thomas
> > > > > 
> > > > > --
> > > > > Thomas Klokosch
> > > > > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)
> > > > > http://www.controlledrandom.com/
> > > > > 
> > > > > Hauptstr. 4
> > > > > 10827 Berlin
> > > > > 
> > > > > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912) 
(tel:%2B49%20151%20156%2074%20912)
> > > > > Skype thomas.klokosch
> > > > > Twitter @thomasklokosch
> > > > > 
> > > > > 
> > > > > 
> > > > > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
> > > > > 
> > > > > > Thomas,
> > > > > > 
> > > > > > Try this instead of "shotgun config.ru (http://config.ru) 
(http://config.ru) (http://config.ru)":
> > > > > > 
> > > > > > thin -R config.ru (http://config.ru) (http://config.ru) 
(http://config.ru)
> > > > > > 
> > > > > > Brian Gonzalez
> > > > > > 
> > > > > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)> wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > I'm new to Nesta and have only limited experience with ruby 
environments.
> > > > > > > I followed the quickstart guide on the Nesta site, it all 
works, but every page needs around 20+ seconds to render.
> > > > > > > All the required Gems are installed, I'm using a speparate 
RVM gemset for that and tried both webrick and thin to serve the files, 
always gets me the same results.
> > > > > > > I tried digging deeper into it with the shotgun -d debug 
parameter, it gives me quite a few exceptions in various gems, including 
nesta & psych.
> > > > > > > But I'm not even sure that's related since the website 
generates just fine. I know shotgun always reloads everything, opposed to 
other tools, but I guess 20+ seconds is a bit odd...
> > > > > > > 
> > > > > > > I'm on a current generation MBA with i7, Lion.
> > > > > > > Would be great if someone had any advice on how to debug this.
> > > > > > > 
> > > > > > > Thanks,
> > > > > > > Thomas
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 


Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Graham Ashton
Date:
2012-05-08 @ 12:07
On 5 May 2012, at 22:36, Thomas Klokosch wrote:

> While running Nesta through shotgun -d, I get a lot of messages on the 
console, among them:
> 
> Exception `Nesta::MetadataParseError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/models.rb:130
- Nesta::MetadataParseError
> Exception `LoadError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:108
- no such file to load -- redcarpet
> Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/navigation.rb:26
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>

Hi Thomas. Sorry I'm late replying, I've been away.

Those exceptions are perfectly normal (as are all the psych ones). I get 
them on my local sites too when I run shotgun with -d.

With a 20 second response on modern hardware, something clearly isn't 
right. The Nesta demo site runs fast on my Macbook Air.

I see you're using a preview release of Ruby 1.9.3. I doubt that's the 
cause, but it might be worth trying an upgrade.

Just to be clear, there's nothing getting loaded in your own app.rb or 
config.ru file that could be causing a problem is there?

It doesn't sound like it, but have you got a theme of your own installed, 
or any JavaScript being loaded off an external server?

Are you getting 20 second load times off a site created like this, with no
changes made to it?

  $ nesta new test-site
  $ cd test-site
  $ nesta demo:content
  $ shotgun config.ru

If so, there must be something different about your setup, as a site 
created like that (with Nesta 0.9.13) is really quick for me on Lion. I'm 
using rbenv and get a quick response with 1.9.2-p290 and 1.9.3-p125.

--
Graham Ashton
Founder, The Agile Planner
http://theagileplanner.com | @agileplanner | @grahamashton


Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Brian Gonzalez
Date:
2012-05-05 @ 21:52
Have you run the 'bundle' command? Also try 'gem install redcarpet'.

Sent from my BriPhone

On May 5, 2012, at 2:36 PM, Thomas Klokosch <thomas.klokosch@me.com> wrote:

> I just started thin with a basic 'hello world' sinatra app and it 
responds very fast.
>
> And if I read my iStatMenus correctly, a request to the Nesta demo page 
runs at all 4 cores averaged around 66% idle, with the Ruby/Nesta process 
taking up 99% of the active CPU usage.
> I also just restarted my computer, but no effect.
>
> When I start Nesta with the cache:true configuration, I run into the 
caching issue that is described here in the archive.
>
> While running Nesta through shotgun -d, I get a lot of messages on the 
console, among them:
>
> Exception `Nesta::MetadataParseError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/models.rb:130
- Nesta::MetadataParseError
> Exception `LoadError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:108
- no such file to load -- redcarpet
> Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/navigation.rb:26
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>
> Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/haml-3.1.4/lib/haml/helpers.rb:340
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>
>
>
>
>
>
>
> On Saturday, May 5, 2012 at 11:02 PM, Max Sadrieh wrote:
>
>> Even if it's reprocessed every time, it shouldn't take 20 seconds.
>>
>> What format are you using? Can you start another app with thin to see 
how much time it takes? What about a static website with Apache or nginx 
or lighttpd? What's your CPU usage, RAM usage, etc. and what's thin's 
share of these when it's responding to a request?
>>
>> If necessary, you can modify nesta and return a simple string, to see 
if it's nesta or something else.
>>
>>
>>
>> On May 5, 2012, at 4:53 PM, Brian Gonzalez <me@briangonzalez.org 
(mailto:me@briangonzalez.org)> wrote:
>>
>>> You might also want to try setting "cache:true" in config/config.yml. 
This will ensure your files aren't rendered every single time.
>>>
>>> On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch <thomas.klokosch@me.com (mail
>> to:thomas.klokosch@me.com)> wrote:
>>>> It does start but it's still slow, like before.
>>>>
>>>> On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
>>>>> Oops, "thin start -R config.ru (http://config.ru) (http://config.ru)"
>>>>>
>>>>> On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)> wrote:
>>>>>> Hi Brian,
>>>>>>
>>>>>> 'thin -R config.ru (http://config.ru) (http://config.ru)' gives me:
>>>>>> Command required
>>>>>>
>>>>>> Usage: thin [options] start|stop|restart|config
>>>>>>
>>>>>> (thin 1.3.1 codename Triple Espresso)
>>>>>> btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
>>>>>>
>>>>>> Thomas
>>>>>>
>>>>>> --
>>>>>> Thomas Klokosch
>>>>>> thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)
>>>>>> http://www.controlledrandom.com/
>>>>>>
>>>>>> Hauptstr. 4
>>>>>> 10827 Berlin
>>>>>>
>>>>>> Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912) 
(tel:%2B49%20151%20156%2074%20912)
>>>>>> Skype thomas.klokosch
>>>>>> Twitter @thomasklokosch
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
>>>>>>
>>>>>>> Thomas,
>>>>>>>
>>>>>>> Try this instead of "shotgun config.ru (http://config.ru) 
(http://config.ru) (http://config.ru)":
>>>>>>>
>>>>>>> thin -R config.ru (http://config.ru) (http://config.ru) (http://config.ru)
>>>>>>>
>>>>>>> Brian Gonzalez
>>>>>>>
>>>>>>> On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm new to Nesta and have only limited experience with ruby environments.
>>>>>>>> I followed the quickstart guide on the Nesta site, it all works, 
but every page needs around 20+ seconds to render.
>>>>>>>> All the required Gems are installed, I'm using a speparate RVM 
gemset for that and tried both webrick and thin to serve the files, always
gets me the same results.
>>>>>>>> I tried digging deeper into it with the shotgun -d debug 
parameter, it gives me quite a few exceptions in various gems, including 
nesta & psych.
>>>>>>>> But I'm not even sure that's related since the website generates 
just fine. I know shotgun always reloads everything, opposed to other 
tools, but I guess 20+ seconds is a bit odd...
>>>>>>>>
>>>>>>>> I'm on a current generation MBA with i7, Lion.
>>>>>>>> Would be great if someone had any advice on how to debug this.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Thomas
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
>

Re: [nesta] Nesta/Shotgun really slow, 20+ seconds to render

From:
Thomas Klokosch
Date:
2012-05-05 @ 22:13
Yes, did both, no change.

I also tried installing the gem psych.

Now I get a BootError with both shotgun and starting thin directly:

ArgumentError: wrong number of arguments(2 for 1)

/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/psych-1.3.2/lib/psych.rb:203:in
`parse' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/psych-1.3.2/lib/psych.rb:203:in
`parse_stream' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/psych-1.3.2/lib/psych.rb:151:in
`parse' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/psych-1.3.2/lib/psych.rb:127:in
`load' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/nesta-0.9.13/lib/nesta/config.rb:68:in
`from_yaml' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/nesta-0.9.13/lib/nesta/config.rb:18:in
`method_missing' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/nesta-0.9.13/lib/nesta/app.rb:23:in
`<class:App>' 
/Users/murphy/.rvm/gems/ruby-1.9.3-preview1@nesta/gems/nesta-0.9.13/lib/nesta/app.rb:18:in
`<module:Nesta>'






On Saturday, May 5, 2012 at 11:52 PM, Brian Gonzalez wrote:

> Have you run the 'bundle' command? Also try 'gem install redcarpet'.
> 
> Sent from my BriPhone
> 
> On May 5, 2012, at 2:36 PM, Thomas Klokosch <thomas.klokosch@me.com 
(mailto:thomas.klokosch@me.com)> wrote:
> 
> > I just started thin with a basic 'hello world' sinatra app and it 
responds very fast.
> > 
> > And if I read my iStatMenus correctly, a request to the Nesta demo 
page runs at all 4 cores averaged around 66% idle, with the Ruby/Nesta 
process taking up 99% of the active CPU usage.
> > I also just restarted my computer, but no effect.
> > 
> > When I start Nesta with the cache:true configuration, I run into the 
caching issue that is described here in the archive.
> > 
> > While running Nesta through shotgun -d, I get a lot of messages on the
console, among them:
> > 
> > Exception `Nesta::MetadataParseError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/models.rb:130
- Nesta::MetadataParseError
> > Exception `LoadError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:108
- no such file to load -- redcarpet
> > Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/nesta-0.9.13/lib/nesta/navigation.rb:26
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>
> > Exception `NameError' at 
/Users/murphy/.rvm/gems/ruby-1.9.2-p290/gems/haml-3.1.4/lib/haml/helpers.rb:340
- undefined local variable or method `_hamlout' for 
#<Nesta::App:0x007fe504fc27b8>
> > 
> > 
> > 
> > 
> > 
> > 
> > On Saturday, May 5, 2012 at 11:02 PM, Max Sadrieh wrote:
> > 
> > > Even if it's reprocessed every time, it shouldn't take 20 seconds.
> > > 
> > > What format are you using? Can you start another app with thin to 
see how much time it takes? What about a static website with Apache or 
nginx or lighttpd? What's your CPU usage, RAM usage, etc. and what's 
thin's share of these when it's responding to a request?
> > > 
> > > If necessary, you can modify nesta and return a simple string, to 
see if it's nesta or something else.
> > > 
> > > 
> > > 
> > > On May 5, 2012, at 4:53 PM, Brian Gonzalez <me@briangonzalez.org 
(mailto:me@briangonzalez.org)> wrote:
> > > 
> > > > You might also want to try setting "cache:true" in 
config/config.yml. This will ensure your files aren't rendered every 
single time.
> > > > 
> > > > On Sat, May 5, 2012 at 1:51 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) (mail
> > > to:thomas.klokosch@me.com (mailto:thomas.klokosch@me.com))> wrote:
> > > > > It does start but it's still slow, like before.
> > > > > 
> > > > > On Saturday, May 5, 2012 at 10:46 PM, Brian Gonzalez wrote:
> > > > > > Oops, "thin start -R config.ru (http://config.ru) (http://config.ru)"
> > > > > > 
> > > > > > On Sat, May 5, 2012 at 1:45 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com)> wrote:
> > > > > > > Hi Brian,
> > > > > > > 
> > > > > > > 'thin -R config.ru (http://config.ru) (http://config.ru)' gives me:
> > > > > > > Command required
> > > > > > > 
> > > > > > > Usage: thin [options] start|stop|restart|config
> > > > > > > 
> > > > > > > (thin 1.3.1 codename Triple Espresso)
> > > > > > > btw.: I'm on Ruby 1.9.2, also tried 1.9.3-preview and 1.9.3-head
> > > > > > > 
> > > > > > > Thomas
> > > > > > > 
> > > > > > > --
> > > > > > > Thomas Klokosch
> > > > > > > thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)
> > > > > > > http://www.controlledrandom.com/
> > > > > > > 
> > > > > > > Hauptstr. 4
> > > > > > > 10827 Berlin
> > > > > > > 
> > > > > > > Phone +49 151 156 74 912 (tel:%2B49%20151%20156%2074%20912) 
(tel:%2B49%20151%20156%2074%20912)
> > > > > > > Skype thomas.klokosch
> > > > > > > Twitter @thomasklokosch
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On Saturday, May 5, 2012 at 10:35 PM, Brian Gonzalez wrote:
> > > > > > > 
> > > > > > > > Thomas,
> > > > > > > > 
> > > > > > > > Try this instead of "shotgun config.ru (http://config.ru) 
(http://config.ru) (http://config.ru)":
> > > > > > > > 
> > > > > > > > thin -R config.ru (http://config.ru) (http://config.ru) 
(http://config.ru)
> > > > > > > > 
> > > > > > > > Brian Gonzalez
> > > > > > > > 
> > > > > > > > On Sat, May 5, 2012 at 1:25 PM, Thomas Klokosch 
<thomas.klokosch@me.com (mailto:thomas.klokosch@me.com) 
(mailto:thomas.klokosch@me.com) (mailto:thomas.klokosch@me.com)> wrote:
> > > > > > > > > Hi,
> > > > > > > > > 
> > > > > > > > > I'm new to Nesta and have only limited experience with 
ruby environments.
> > > > > > > > > I followed the quickstart guide on the Nesta site, it 
all works, but every page needs around 20+ seconds to render.
> > > > > > > > > All the required Gems are installed, I'm using a 
speparate RVM gemset for that and tried both webrick and thin to serve the
files, always gets me the same results.
> > > > > > > > > I tried digging deeper into it with the shotgun -d debug
parameter, it gives me quite a few exceptions in various gems, including 
nesta & psych.
> > > > > > > > > But I'm not even sure that's related since the website 
generates just fine. I know shotgun always reloads everything, opposed to 
other tools, but I guess 20+ seconds is a bit odd...
> > > > > > > > > 
> > > > > > > > > I'm on a current generation MBA with i7, Lion.
> > > > > > > > > Would be great if someone had any advice on how to debug this.
> > > > > > > > > 
> > > > > > > > > Thanks,
> > > > > > > > > Thomas
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
>