Hacker News new | ask | show | jobs
by rohannair 3498 days ago
I would expect a site about CSS properties to also know about the performance impacts of paints... Takes a good 5s for everything to load.
3 comments

I don't get this complaint. This site is aimed at developers. I think it's safe to assume they're either not viewing this on mobile ever, or are going to come back and visit on desktop/etc if they actually want to use it as a resource for work, so perf is a low priority compared to the content.
I'm not viewing the website on mobile, and nor did the people I shared it with, but we all were surprised at the slowness. Of course, as you mention, the quality of the content is enough to cover over the performance issues, but it most certainly detracts from the website.
Fine, that wasn't the spirit of the original comment I replied to though, which was needlessly negative and lacked any awareness of context.
I'm a developer and I just read this whole site on mobile to see if there's anything I don't know. Initial load was clunky, fonts have initially not been showing up but after that it works pretty well on mobile.
Yep wasn't suggesting it wouldn't work fine on mobile, just addressing the 'perf' criticism which to me, isn't really relevant to most devs when they would tend to use that resource on their dev machines.
I nearly closed it when it it loaded this bad and I saw the fonts missing. But scrolled a bit and fonts showed up. So 'perf' criticism is valid because it's so bad on this site that it affected usability for me.
But you didn't close it? So you're not even one negative datapoint. I don't think any rational dev would close a useful developer resource based on perf reasons.

Again, I'm merely replying to the initial comment which was needlessly negative and frankly a tiring trope on HN (rudely criticising something unimportant about the site regardless of its intended use).

Honestly, your going on about it is worse. Sometimes a negative comment just comes out badly. It happens. And even then, taken in good faith, at least it's somewhat constructive. This whole sub-thread of you arguing against people doing exactly that, is off-topic good for nothing ballast. That is a tiring and persistent HN-trope I can really do without.
Developers don't use mobile? Or tablets? Or...performance?

http://imgur.com/a/GiGBY

That's not what I said.
It's not your exact words, but I don't think it's an unfair characterization, if the excuse is simply that they'll be reading it on a desktop machine anyway.

I took that image from a non-laptop desktop machine, by the way.

> It's not your exact words, but I don't think it's an unfair characterization

You ignored the half of the sentence following the 'or'. To me, that's unfair.

> if the excuse is [...]

It's not an excuse, it's context.

The performance is a low priority compared to the content, when the site is a developer resource.

And for me it speaks to credibility.
How would they fix that? It's rendering all the examples on one page (like it should) so I understand it takes a long time.
Well they could have a list of the properties without them all rendered and then render just the property they need when someone clicks on the property name.

And why should it render all examples on one page?

They could have a static page for every property so one could link to http://cssreference.io/align-content instead of http://cssreference.io/#align-content and get just that static page. That should be pretty quick, especially with long caching of all other resources than the actual page content.

There's lots of different ways to have done it without having to do it all at once.

I personally don't like that solution. I want to see everything (on one page) without having to click anything.
How about both?
Then someone would have complained that this site needed JavaScript to handle those click event.

Or, would have complained that it was stupid to actually use an anchor tag to link to god forbid another complete page load.

Or, if they used a javascript framework to make deep links someone would have complained that they used a javascript framework for a static page, or even maybe they used the wrong JavaScript framework.

> like it should

No it shouldn't. Split up large chunks if it impacts performance.

I think it's much better UX to show everything on one page in this case. You're speaking like this is an application, completely disregarding the purpose.
I agree that it is fine for a reference site. Though, Virtual elements are possibly a solution where only the current viewport is painted.
The best solution would be to lazy load. If you can only see the first 3 property on page load, there is no gain in having them all load at the same time.
No it wouldn't, because this means additional delays for anyone that is actually using the site.
Lazy loading done well is invisible for the user. You preload things as users scroll down and when user hover / click on one of the anchors.
That doesn't work for those ctrl+f'ing for a specific property.

I'd probably do a full load for the text, with specifying the height for the examples inline, and then lazy-render the examples once they're visible.

You could have all content just unstyled (apart from sections heights) and enable the style for each section as it comes into view.

The problem with this site is not that it has too much context. Just too much new and crazy styles.

You would still need all the text to be in the markup for SEO purposes anyway.
Like how wikipedia does it? Full content but mostly collapsed.
The page almost crashed my browser and made me not want to use it.

Very lazy on the part of the developer to code it that way.

The page almost crashed my browser

Thanks for the report. Hopefully the author will almost fix it.

My chrome was unresponsive but recovered.
How would you do it and still view all the properties on one page?
Disable all the styles. Enable the styles just for the sections that are currently visible.

It would require setting section heights to fixed values so you can know which section is visible and enable and disable styles for them without changing the sites height.

I wouldn't have the properties on one page.
Then it's more a matter of taste than laziness. I very much prefer to have them all on a single page.
Except that it loads slowly which hurts the usability so it's not really that I prefer a certain layout but more that I prefer the page to load easily.
Scrolling is giving me ~20fps on my MBP...ouch.
And yet on the native browser on my (underspecced) Jolla phone, scrolling is beautifully smooth...
Really - it's fine here on this old iMac running updated Safari