Issue 10903 - rebuild dlang.org documentation

Brad Anderson eco at gnuk.net
Fri Sep 6 12:52:20 PDT 2013


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.


More information about the Digitalmars-d mailing list