HAML/SaSS 2.0

0 views
Skip to first unread message

Eumir Gaspar

unread,
Jul 16, 2008, 2:10:24 PM7/16/08
to Philippine Ruby Users Group (PRUG/PhRUG)
Just checked their site and saw that they just released 2.0(I actually don't know when they released though...there wasn't any date). They now claim(and I quote):

"The speed increase for 2.0 is nowhere near as impressive as 1.8, but it's still interesting. According to our benchmarks1, Haml is now slightly faster than ERB, even when rendering via ActionView."

Has anyone actually tried this? And has anyone tried this on large sites that have a lot of traffic? How did it go?

--
Eumir
Web Developer
http://admoolabs.com

Greg Moreno

unread,
Jul 17, 2008, 8:35:31 AM7/17/08
to ruby...@googlegroups.com
Hi Eumir,

We're using haml 2.0 but we don't have a large traffic yet :)

- Greg

Eumir Gaspar

unread,
Jul 17, 2008, 9:35:33 AM7/17/08
to ruby...@googlegroups.com
Hmm kinda curious as to how this would scale though, since it has to compile the code and such, but I guess it won't have that much of a difference since it will basically just compile once since it can be cached? or does it always have to compile every time you view a page?

j4s0n

unread,
Jul 24, 2008, 7:37:57 PM7/24/08
to Philippine Ruby Users Group (PRUG/PhRUG)
I benchmarked my coding though. It makes me 80% faster than using ERB.
lol.

There isn't significant development increase with using SASS against
CSS besides the fact if you do HAML, why not instead use SASS too so
the language shift isn't big. SASS Variables are pretty much an
increase help, so is mixins.

On Jul 17, 9:35 pm, "Eumir Gaspar" <imacaterpil...@gmail.com> wrote:
> Hmm kinda curious as to how this would scale though, since it has to compile
> the code and such, but I guess it won't have that much of a difference since
> it will basically just compile once since it can be cached? or does it
> always have to compile every time you view a page?
>
> On Thu, Jul 17, 2008 at 8:35 PM, Greg Moreno <greg.mor...@gmail.com> wrote:
>
> > Hi Eumir,
>
> > We're using haml 2.0 but we don't have a large traffic yet :)
>
> > - Greg
>
> > On Thu, Jul 17, 2008 at 2:10 AM, Eumir Gaspar <imacaterpil...@gmail.com>

Eumir Gaspar

unread,
Jul 24, 2008, 8:11:54 PM7/24/08
to ruby...@googlegroups.com
actually i was just planning to use SASS(since converting all the existing views i have to haml will take forever). Thanks for the input! I figured I'll just use SASS in my local machine and just upload the generated css files to the repository(so i don't even have to freeze haml now)

Greg Moreno

unread,
Jul 24, 2008, 8:38:22 PM7/24/08
to ruby...@googlegroups.com
One cool thing I like about sass is I have my constants in
constants.sass and in my layout.sass I could do this:

#content_main
:width = !wBody - !wContentNav - !wContentColMargin
:margin-left = !wContentNav + !wContentColMargin


On Fri, Jul 25, 2008 at 7:37 AM, j4s0n <jason.e...@gmail.com> wrote:

Eumir Gaspar

unread,
Jul 25, 2008, 8:40:15 AM7/25/08
to ruby...@googlegroups.com
question about mixins: can they only be called from the file they were declared? because i have a mixin in main.sass and a file named contents.sass which imports main. I tried calling the mixin but it says it is undefined. or am i just doing things wrong?

Greg Moreno

unread,
Jul 25, 2008, 1:56:39 PM7/25/08
to ruby...@googlegroups.com
please paste the code

Eumir Gaspar

unread,
Jul 25, 2008, 10:47:36 PM7/25/08
to ruby...@googlegroups.com

Greg Moreno

unread,
Jul 25, 2008, 10:57:53 PM7/25/08
to ruby...@googlegroups.com
@import main.css -> @import main.sass

Eumir Gaspar

unread,
Jul 25, 2008, 11:19:02 PM7/25/08
to ruby...@googlegroups.com
woops! i fail hehehe..thanks!

Greg Moreno

unread,
Jul 25, 2008, 11:27:15 PM7/25/08
to ruby...@googlegroups.com
On Sat, Jul 26, 2008 at 11:19 AM, Eumir Gaspar <imacate...@gmail.com> wrote:
> woops! i fail hehehe..thanks!

np. hth

- greg

fmagsipoc

unread,
Jul 28, 2008, 4:14:57 AM7/28/08
to Philippine Ruby Users Group (PRUG/PhRUG)
Reply all
Reply to author
Forward
0 new messages