September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 2013-09-06 20:24, H. S. Teoh wrote: > If I had to guess, it's because we finally nuked hyphenate.js and > hyphenate-selectively.js, both of which are big resource hogs that > provide only barely-noticeable functionality. Why do these script take so long time in the first place to download/run? -- /Jacob Carlborg |
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, Sep 06, 2013 at 11:34:59AM -0700, Andrei Alexandrescu wrote: > On 9/6/13 11:24 AM, H. S. Teoh wrote: > >On Fri, Sep 06, 2013 at 08:17:10PM +0200, Gary Willoughby wrote: > >>On Friday, 6 September 2013 at 06:13:44 UTC, Martin Nowak wrote: > >>>Meanwhile feel free to use http://dlang.dawg.eu. > >> > >>Woah! Why is this so much faster than dlang.org? > > > >If I had to guess, it's because we finally nuked hyphenate.js and hyphenate-selectively.js, both of which are big resource hogs that provide only barely-noticeable functionality. > > s/barely-noticeable/awesome/ [...] If you consider requiring a nuclear power plant to power a handheld flashlight "awesome", then yes. ;-) Seriously, there are better ways to hyphenate text than to use, of all things, *javascript*. Don't get me wrong, I don't have anything against *hyphenation* per se -- I'm a pretty big fan of proper typography too -- but when it comes at the cost of slowing the site down almost to the point of unusability, then clearly we've gotten our priorities all wrong. The primary function of the site is to provide documentation about D, not to show off javascript's ability to hyphenate text. T -- He who laughs last thinks slowest. |
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Fri, Sep 06, 2013 at 08:51:29PM +0200, Jacob Carlborg wrote: > On 2013-09-06 20:24, H. S. Teoh wrote: > > >If I had to guess, it's because we finally nuked hyphenate.js and hyphenate-selectively.js, both of which are big resource hogs that provide only barely-noticeable functionality. > > Why do these script take so long time in the first place to download/run? [...] Beats me. All I know is that they (or their ilk) made browsing dlang.org so painful that I decided to block javascript completely in dlang.org. It became surprisingly easier to use after that. Even on a fast machine with lots of RAM where you wouldn't notice the loading/running times, hyphenate*.js still causes annoying page flickering. I honestly am totally puzzled why people thought such a thing was a good idea in the first place, considering that (1) it requires a huge amount of CPU power and RAM, (2) it requires high-speed internet access which not everybody has, and (3) even after that it still flickers like it was a BASIC program running on a 6502 processor from the 70's. Like I said, the only way it can be considered "awesome" is if you consider powering a handheld flashlight with a nuclear power plant to be an "awesome" idea. But anyway. That's enough rubbing it in. It's gone now, good riddance and all that, and we don't have to argue over this anymore. T -- "Real programmers can write assembly code in any language. :-)" -- Larry Wall |
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Friday, 6 September 2013 at 18:51:29 UTC, Jacob Carlborg wrote:
> On 2013-09-06 20:24, H. S. Teoh wrote:
>
>> If I had to guess, it's because we finally nuked hyphenate.js and
>> hyphenate-selectively.js, both of which are big resource hogs that
>> provide only barely-noticeable functionality.
>
> Why do these script take so long time in the first place to download/run?
hyphenate.js uses a big language lookup table to insert thousands of ­ into all of the words on the entire page so that the browser can hyphenate the words. It seems the author has spent a lot of time trying to make it run fast but it's going to be slow just by the nature of what it has to do. A proper hyphenation algorithm is faster because it takes place during the layout stage so it doesn't need to consider every word for hyphenation (and also would be written in native code) but that option isn't available to javascript as far as I know.
|
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | On 9/6/13, Brad Anderson <eco@gnuk.net> wrote:
> hyphenate.js uses a big language lookup table to insert thousands of ­
Wouldn't it be much more effici-
ent and more readable to just use word
wrapping? I find hyphenation to create unread-
able documents, because it always for-
ces me to stop and rewind be-
fore I can read the next word, which is extre-
mely annoying when you have a wide-
screen display.
Hyphenation also looks unprofessional when it's used in a title. E.g.:
"The D programming language. Modern convenience. Modeling power. Native effi- ciency."
It just looks so awful. Imagine Apple using it, advertising their newest i- Phone. Ugh!
|
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
On 9/6/13, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
> stop and rewind be-
> fore I can read the next word
Sorry, I meant "the current word" fully.
|
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | 07-Sep-2013 00:39, Andrej Mitrovic пишет: > On 9/6/13, Brad Anderson <eco@gnuk.net> wrote: >> hyphenate.js uses a big language lookup table to insert thousands >> of ­ > > Wouldn't it be much more effici- > ent and more readable to just use word > wrapping? I find hyphenation to create unread- > able documents, because it always for- > ces me to stop and rewind be- > fore I can read the next word, which is extre- > mely annoying when you have a wide- > screen display. > > Hyphenation also looks unprofessional when it's used in a title. E.g.: > > "The D programming language. Modern convenience. Modeling power. Native effi- > ciency." > +1 That pretty much nails it. -- Dmitry Olshansky |
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | On 09/06/2013 09:52 PM, Brad Anderson wrote: > hyphenate.js uses a big language lookup table to insert thousands of > ­ into all of the words on the entire page so that the browser can > hyphenate the words. It seems the author has spent a lot of time trying > to make it run fast but it's going to be slow just by the nature of what > it has to do. A proper hyphenation algorithm is faster because it takes > place during the layout stage so it doesn't need to consider every word > for hyphenation (and also would be written in native code) but that > option isn't available to javascript as far as I know. The trie compression algorithm is actually quite interesting. It uses prefix and suffix compression at the same time with some priority system to disambiguate longer matches. I went and wrote a D library. http://code.dlang.org/packages/hyphenate It's not capable of processing HTML but if somebody had an idea how to integrate it in the doc generation we could use it. Otherwise I'm hoping for https://github.com/D-Programming-Language/tools/tree/master/dpl-docs. |
September 06, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
On 09/06/13 19:36, H. S. Teoh wrote:
> current dlang.org repo introduces all kinds of dependencies on all kinds of stuff -- like latex, kindlegen, etc., that people may not have. I find myself running make -j6 several times just to coax it to build the stuff it can instead of aborting on stuff that isn't installed on my machine).
make -j6 -k
artur
|
September 07, 2013 Re: Issue 10903 - rebuild dlang.org documentation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dmitry Olshansky | On 9/6/13 1:47 PM, Dmitry Olshansky wrote:
> 07-Sep-2013 00:39, Andrej Mitrovic пишет:
>> On 9/6/13, Brad Anderson <eco@gnuk.net> wrote:
>>> hyphenate.js uses a big language lookup table to insert thousands
>>> of ­
>>
>> Wouldn't it be much more effici-
>> ent and more readable to just use word
>> wrapping? I find hyphenation to create unread-
>> able documents, because it always for-
>> ces me to stop and rewind be-
>> fore I can read the next word, which is extre-
>> mely annoying when you have a wide-
>> screen display.
>>
>> Hyphenation also looks unprofessional when it's used in a title. E.g.:
>>
>> "The D programming language. Modern convenience. Modeling power.
>> Native effi-
>> ciency."
>>
> +1
> That pretty much nails it.
No, it doesn't.
Andrei
|
Copyright © 1999-2021 by the D Language Foundation