News for hackers. Stuff that matters.
Re:On Layout and Web Performance by pestaa on Monday January 28, 2013 @09:03AM (#5128493)
Excellent article. Most projects treat the client-side like a necessary evil and so I've seen pages with thousands of divs that can cause a hundred reflows for a single click. Not good, although at least it made the backend feel very fast in comparison!

And here's Kelly Norton's example code: http://kellegous.com/media/upload/2013/01/layout.js

Re:On Layout and Web Performance by yawgmoth on Monday January 28, 2013 @03:07PM (#5130358)
I really like that he included a reduced case of sample code. It really makes it easy to understand the differences in the solution.

Also, that last line, that comment, heh.

Re:On Layout and Web Performance by simula67 on Monday January 28, 2013 @09:44AM (#5128659)
Imagine my surprise when I groggily google Kelly Norton.
Re:On Layout and Web Performance by kellegous on Monday January 28, 2013 @09:50AM (#5128670)
I've been battling with her in PageRank for years. I claim she isn't playing fair!
Re:On Layout and Web Performance by joshuacc on Monday January 28, 2013 @01:10PM (#5129706)
FYI, it took me a little digging around to figure out where your atom feed is. :-)

Here in case anyone else wants it: http://kellegous.com/atom.xml

Re:On Layout and Web Performance by kellegous on Monday January 28, 2013 @07:42PM (#5131680)
Thanks. I've meaning to put the links back for a while and never have done it.
Re:On Layout and Web Performance by LukeShu on Monday January 28, 2013 @05:53PM (#5131254)
I think the problem is that she appears on multiple sites. Even if you get the first link (as you do when I Google you, but Google has me pretty heavily bubbled into technology), she gets a good part of the page. This is because search engines don't like to return a bunch of very similar responses. So while hits for you are limited to the several sites you are on (your site, LinkedIn, Twitter, Facebook), there are apparently tons of porn sites that she is on.

I'll throw in that Google did a pretty good job of giving you links. On "my Google", you got 4 of the first 5 links, but non after that on the first page. On DuckDuckGo, which doesn't bubble me in, (but has a technology bias) you only got 1 of the first 5 links.

Re:On Layout and Web Performance by ybaumes on Monday January 28, 2013 @12:12PM (#5129358)
You've disabled your safe search!! ;-)
Re:On Layout and Web Performance by LukeShu on Monday January 28, 2013 @05:41PM (#5131198)
With DuckDuckGo, the porn star is 3 of the first 5 links, even with Safe Search on.

Only 1 of the remaining 2 is kellegous.com (The other is a health care consultant on LinkedIn).

Re:On Layout and Web Performance by camus on Monday January 28, 2013 @10:23AM (#5128814)
lol, kinda like Violet Blue (the journalist) unfortunatly , s long as people will search for the porn star nickname , the genuine person will come second in google results.
Re:On Layout and Web Performance by FireBeyond on Monday January 28, 2013 @03:46PM (#5130537)
Whilst Violet Blue may be the journalist's legal name, the flurry of trademarking, and other assorted activity, leads me to strongly suspect it is not her birth name. In which case, she has no more "claim" to the name except being "first to the gate" (then aggressively defending it).
Re:On Layout and Web Performance by bzbarsky on Monday January 28, 2013 @09:28PM (#5132024)
The right solution to this problem in general is to not do layout manually in script and instead do declarative layout in CSS. That, of course, requires more powerful CSS features, but those are happening. Several browsers now shipping calc() unprefixed and flexbox is well on its way; those should help a lot between the two of them...
Re:On Layout and Web Performance by danso on Monday January 28, 2013 @09:10AM (#5128515)
The little pop-up bubble in the lower-right corner showing the reader how long it took the page to render is pretty sweet.
Re:On Layout and Web Performance by bink-lynch on Monday January 28, 2013 @02:46PM (#5130242)
Very enlightening! I am building a single-page application, was one of the "unaware" that will definitely be much more mindful of this now. Thank you!
Re:On Layout and Web Performance by kevin_rubyhouse on Monday January 28, 2013 @03:35PM (#5130488)
Why does Element.innerText cause the browser to "layout?" The author said he might explain this in another article.
Re:On Layout and Web Performance by kellegous on Monday January 28, 2013 @04:09PM (#5130651)
You are going to make me give away my future punchline. ;-) The short story is that innerText will include the line breaks that are introduced by text layout. A lot of people call innerText when what they actually want is textContent (which doesn't layout because is just a concatenation of the descendent text nodes)