Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why browsers are bloated

Name: Anonymous 2014-07-27 0:20

https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/Scrollbar.cpp
https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/win/ScrollbarThemeWin.cpp
Let's reinvent the fucking scrollbar, which every goddamn platform with a UI already has, and make it behave subtly different from the native one!

Right-click a native scrollbar in some other app:
- Scroll Here
- Top
- Bottom
- Page Up
- Page Down
- Scroll Up
- Scroll Down

Right-click a scrollbar in Chrome:
- Back
- Forward
- Reload
- Save As...
...

Right-click a scrollbar in Firefox and Opera:
Absolutely fucking nothing happens!

What the fuck!? How did these terminally retarded idiots get involved in creating one of the most important pieces of software to the average user?

Name: Cudder !cXCudderUE 2016-03-13 16:20

>>856
It took SunOracle over two decades to get Java even slightly approaching what could be considered reasonable efficiency. And it's still a ridiculously bloated pig.

>>859
The disgustingly long variable names, excessive use of typedefs, "== NULL", and general idiocy of dynamically allocating an array which will be filled completely with constants in every fucking parser object strongly reeks of Enterprise Java-ism.

>>861
Here's something to cheer you up, the tag name processing in my tokeniser:

; found '<', what comes next?
call [ebp+htmlp.func_getchar] ; EOF - emit text
eof_emittext1:
call isalpha
jc not_alpha
tag_name:
call emit_text ; emit this text
lea eax, [esi-1]
mov [ebp+htmlp.data_ptr], eax ; start of tag name
push 1
pop [ebp+htmlp.data_len]
mov [ebp+htmlp.n_attrs], 0
tag_name_loop:
call [ebp+htmlp.func_getchar] ; EOF - ignore
call chk_tag_end_iswhs
jz find_attr_loop
inc dword ptr [ebp+htmlp.data_len]
jmp tag_name_loop


Those 14 instructions (and the procs it calls) are essentially all that's needed to detect and process a tag name. The spec and the monster posted above need substantially more to do the same thing. The jumps to code you can't see are the state transitions directly. None of that mh_state_set (try to find in which of those files it's defined and how many levels of indirection there are, then facepalm when you see what it actually does), returning from a function, then going through an indirect call maybe back into the same damn function bullshit.

Newer Posts