[LRUG] Middleman slow. Am I missing something?

Murray Steele murray.steele at gmail.com
Tue Jul 28 09:31:24 PDT 2015


What middleman and ruby versions are you using?  The lrug website runs on
middleman nowadays and if I do the a similar command with that app:

$ ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin13.0]

$ grep "middleman " Gemfile.lock
    middleman (3.3.7)

$ time bundle exec middleman build --no-clean -g index.html
   identical  public/index.html
      create  public/version.json
bundle exec middleman build --no-clean -g index.html  1.53s user 0.22s
system 99% cpu 1.763 total

I ran that a bunch of times and it’s always about 1.8s total.

So, yes, it’s a bit slow compared to the perl tool, but it’s not clear if
that’s ruby vs. perl or middleman vs. ttree.  My guess is there’s some
startup cost for a large middleman app (similar to a rails app?) that might
be a factor here as if I take the build reporter plugin out (the thing
that’s generating public/version.json in my run) it saves another 0.15s off
the total:

$ time bundle exec middleman build --no-clean -g index.html
   identical  public/index.html
bundle exec middleman build --no-clean -g index.html  1.45s user 0.19s
system 99% cpu 1.647 total

So it’s possible there’s some slowdown depending on the types of plugins
and things your site compilation is doing.

However, even if I wipe my build directory and regenerate the whole lrug
site it only takes ~9s which isn’t that slow.  That’s not to say that if
you (or anyone else) finds a magic speedup option I wouldn’t be interested
in using it ;)

Cheers,

Murray

On 28 July 2015 at 01:46, gvim <gvimrc at gmail.com> wrote:

> From the source directory of my Middleman project:
>
> ../bin/middleman build --no-clean -g index.html
>
> .... takes 2.24 seconds
>
> I switched from Perl to Ruby a couple of years ago but with Perl's
> Template::Toolkit, which is by no means a lightweight library, the same
> processs:
>
> ttree -f ../tt/ttree.cfg index.sht
>
> ... takes 0.13 seconds.
>
> Am I missing an option or something?
>
> gvim
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20150728/33ee469e/attachment-0003.html>


More information about the Chat mailing list