Since there\'s the DOM, JavaScript is a hated language. But strangely JavaScript itself is even though it\'s so dynamic pretty fast and powerful - only the forced connection to the document object model makes it horribly slow at some times.
In this session you don\'t learn how to optimize DOM access using jQuery for example, but how to almost completely be able to ignore it.
3. JS Performance Stack
CSS
JavaScript Displayed in Browser
DOM
Rendering
Paul Bakaus, Liferay 3
4. JS Performance Stack
CSS
Rendered
JavaScript representation
DOM
Parsing
Paul Bakaus, Liferay 4
5. JS Performance Stack
‣ JavaScript itself is not what
makes JavaScript slow
‣ If we could forget out the
parsing/rendering, Awwww!
JavaScript would be How I hate
the DOM!
lightning fast
Paul Bakaus, Liferay 5
6. But if we were to do
that..
Paul Bakaus, Liferay 6
7. ..we‘d have a beautiful
command line application!
Paul Bakaus, Liferay 7
9. Can we remove CSS?
‣ CSS makes our pages
beautiful
‣ DOM Layer 2 for stylesheets
is actually very fast
No way!
Paul Bakaus, Liferay 9
10. How about DOM?
‣ The DOM gives us representations of objects
in JS
‣ It is used for various tasks, most often to
select and change an element
Paul Bakaus, Liferay 10
11. Two systems
Isolated environment Open environment
External
source
External
source
Paul Bakaus, Liferay 11
12. Two systems
Isolated environment Open environment
External
source
External
source
Paul Bakaus, Liferay 12
13. Old School!
Build custom solutions!
Wait!
I don‘t have the time for that!
..then use a library!
..but that still consumes
too much time :(
does it really?
Paul Bakaus, Liferay 13