|
|
|
|
|
by some1else
4139 days ago
|
|
Slight tangent: I've spent the past week experimenting with different kinds of bitmap caching achievable in the browser. Given that you understand both the browser and the way DisplayObjects implement bitmap caching in Flash, I was wondering if you got any clues on how to optimize DOM heavy pages? There are quite a few situations where momentarilly swapping out complex static DOM with a bitmap representation would decrease drawing calls. What I don't know is, to what extent are browsers smart about caching the renders, and when the overhead of caching by canvas would be smaller than default DOM rendering. However, I've had plenty of success in increasing performance, for instance, using canvas to resample images from original to DOM element size, so I'm optimistic about bitmap caching as well. I'm on a friends tablet now, but I'm looking forward to digging through the implementation later. Keep up the good work! P.s.: Did you find parts of AS3 beautiful? :-) |
|
In Shumway, we do almost all rendering in a Canvas element, so we haven't experimented all that much with DOM-heavy constructs.
As for your last question: I used to work with AS3 on a daily basis in a previous work-life, so I have extensive experience with it. Yes, there are some parts of the language that're very nice. I think that optional static typing is the best of all worlds, for example. The details of AS3's type system leave much to be desired, but the IDE support gained through static typing and the large set of bugs that're far easier to avoid are easily worth it.
Also, declarative classes are, in my opinion much easier to deal with than, e.g., the unstructured alternatives in JS. That's part of why we moved to TypeScript, and I'd argue that it vastly improved the quality of our codebase. I'm very much looking forward to classes in ES6.
Of course there are things that I don't miss about AS3 and regret having to deal with in Shumway. Namespaces are one, E4X the other. Both are good concepts in theory but hugely problematic in practice because of issues in the details.