Live data from Hacker News

Web App Speed

ignorethecode.net

31–38 of 38 posts

Re: Web App Speed

#31
post #27
post #3

Flash sites, apps and games also earned a bad reputation for eating up CPU, loading too long, doing too much and running poorly. And it was mostly due to the culture of the developers. In the Flash vs HTML5 iPhone wars, people argued that if Flash was hated because of the developers who abused it, what's going to stop the same thing happening to HTML5/JS/canvas? It's happening. Usually not on some interactive visuali…

This was posted the other day: https://news.ycombinator.com/item?id=9599905 It's an animated company logo in HTML5. The standout "feature" is that the page pegs a CPU core at 100%. Turns out that this is because the developer wanted to update the page favicon at 60fps. In the post, the developer explained this decision: "I got this idea in my head that it'd be really slick to animate the FavIcon to stay in sync with…

glad i'm not the only one who found that feature to be gratuitous!

Re: Web App Speed

#32

Earlier quoted context omitted.

Flipboard assumed DOM is slow. I don't even think they created a prototype to see how slow DOM is. I implemented this in few hours. Works on iOS, Android 4+ and WP - Demo for mobile: http://premii.com/play/flipboard-style-news/ - I am using it in real app here. http://reddit.premii.com/#/r/news/

Your demo works, but I get an average of 10fps on my LG G3 and 20fps on my iPad, with the occasional freeze. The Flipboard demos are incredibly smooth with no lag or hanging at all.

iPad was released 5 years ago. I have iPad2 and iPad air 2, and both works fine.

I don't have LG. I have tested on Asus, Samsung S3, and Nexus 5. Try it on Chrome browser, and see how it works.

Some images (Washington post, latimes, etc) are bigger than 20 MB each. All browser freezes when you render those images. My demo specifically includes those to see how bad it performance on different devices.

One of the benefit of being a big company is you can control everything. Flipboard scales down those images to 300kb before sending it to browser. I use original images.

Re: Web App Speed

#33

Earlier quoted context omitted.

Flipboard assumed DOM is slow. I don't even think they created a prototype to see how slow DOM is. I implemented this in few hours. Works on iOS, Android 4+ and WP - Demo for mobile: http://premii.com/play/flipboard-style-news/ - I am using it in real app here. http://reddit.premii.com/#/r/news/

DOM is slow. And your example on iPhone 6… well it „works“, but for sure it does not work well.

What doesn't work well?

Does it freezes on 5th and 18th item? That is on purpose.

Re: Web App Speed

#34
post #4

Earlier quoted context omitted.

On a related note, Google penalises websites with longer load times. http://googlewebmastercentral.blogspot.nl/2010/04/using-site...

I understand the reasoning but I don't agree with their implementation, because it essentially favours large sites run by those who can afford the faster infrastructure, while penalising the small ones that may actually have more relevant and detailed content but not very fast servers. Sites which load much faster get a ranking advantage even if they offer only superficial lower-quality content. Maybe if they didn't…

Infrastructure is incredibly cheap these days. Hell there's even a free, high quality, CDN small organizations can take advantage of (cloudflare).

Software architecture has a lot more to do with app speed these days than expensive infrastructure does.

Re: Web App Speed

#35

Earlier quoted context omitted.

Your demo works, but I get an average of 10fps on my LG G3 and 20fps on my iPad, with the occasional freeze. The Flipboard demos are incredibly smooth with no lag or hanging at all.

iPad was released 5 years ago. I have iPad2 and iPad air 2, and both works fine. I don't have LG. I have tested on Asus, Samsung S3, and Nexus 5. Try it on Chrome browser, and see how it works. Some images (Washington post, latimes, etc) are bigger than 20 MB each. All browser freezes when you render those images. My demo specifically includes those to see how bad it performance on different devices. One of the benef…

iPad Mini 3 if you really want me to be specific. I was trying it in the latest version of Chrome on my LG, that's where I get 10fps. Using the stock browser it freezes every other slide (and won't progress past slide 4).

> Some images (Washington post, latimes, etc) are bigger than 20 MB each

Why not use resized ones for your test? Sort of invalidates it if you can't tell if it's being janky because of the DOM or because of image size.

Re: Web App Speed

#36

Earlier quoted context omitted.

I understand the reasoning but I don't agree with their implementation, because it essentially favours large sites run by those who can afford the faster infrastructure, while penalising the small ones that may actually have more relevant and detailed content but not very fast servers. Sites which load much faster get a ranking advantage even if they offer only superficial lower-quality content. Maybe if they didn't…

Infrastructure is incredibly cheap these days. Hell there's even a free, high quality, CDN small organizations can take advantage of (cloudflare). Software architecture has a lot more to do with app speed these days than expensive infrastructure does.

Hell there's even a free, high quality, CDN small organizations can take advantage of (cloudflare).

Cost is only part of the equation. What about those who don't want to use a CDN for, among other things, privacy reasons?

Re: Web App Speed

#37
post #26
post #24

Reading this article was a fresh breeze. The Canvas is very easy to work with. You can forget about JQuery and everything else concerning the DOM and just write pure JavaScript. I've even started working on a canvas based text editor.

I've even started working on a canvas based text editor. Careful! Mozilla tried that as far back as early 2009 (the project was called Bespin, you can google for "mozilla bespin canvas" to find out more). The canvas-based approach was eventually abandoned and the project merged into Ace, a more traditional DOM-based editor.

I did some research before I started and read about Bespin. I don't think they merged into Ace because of the Canvas. It was probably because another team on the same company also worked on an editor, witch had the same goals, and aimed for the same market.

Re: Web App Speed

#38
post #9

The root of all evils, as you commented: "People don’t want to learn JavaScript". However, I think it's because DOM/BOM API sucks. JavaScript, namely the language itself, doesn't even specify any event driven or asynchronous things. Not to mention why NodeList horribly isn't an array, or the need to write the long and annoying 'getElementsByClassName' rather than a simple $( ). (Yes I know things like 'querySelectorA…

someone at Google or Mozilla should already have been writing an API that's similar to jQuery that just "compiles down" to the DOM methods so that the loading of jquery isn't necessary. I'm surprised no one's pushed for using jQuery's API as an additional DOM API. Old browsers you load jquery, new browsers you don't and your code doesn't change. It would cut down on a few seconds of load time for sure and it'd be better than using a CDN.
Post reply on HN