4 ms·
Has anyone here manage to figure out the secrets behind this apps blazing fast performance ?
by thewarrior 12y ago
Has anyone here manage to figure out the secrets behind this apps blazing fast performance ?
- ksherlock 12y agohttps://github.com/quasado/gravit https://github.com/quasado/gravit
- moron4hire 12y agoLoad performance is mostly due to the few number of files that are being included, though minification also helps. Application performance is typical of modern, hand-coded JS. Or rather, I should say, the only reason I can see for why people tolerate bloated frameworks is because they've just come to expect JS to be slow. There is a reason some of us insist on sticking to vanilla JS. It's not because we're crotchety, old, greybeards. We wouldn't be touching JS at all if that were the case. It appears they might also be using layered canvases to render different parts of the workspace that update at different rates. So that prevents them from having to redraw the checkered background every time you move the drawing. And it prevents them from having to redraw the existing drawing every time you add a new element and are still adjusting it. Pretty standard techniques for anyone with experience working with Canvas, actually.
- coldtea 12y agoJS is very fast in modern browsers. It blows things like Python and PHP out of the water, it competes with Go, and with asm.js (or sometimes without) it can be like merely 2x slower than C. The main reason most web apps don't also feel very fast is not "DOM manipulation" or things that happen inside the page, is that they also do AJAX network calls and that adds huge latencies. This app, judging the functionality, does everything inside the VM (no need to do AJAX calls for a drawing app), so can offer the full speed JS can do.