hg serve is soo slow

Laurens Holst laurens.nospam at grauw.nl
Tue Sep 25 17:49:34 CDT 2012

Op 25-9-2012 23:57, Martin Scotta schreef:
> this works fine for me...
> the trick is to process buckets 25 dates each time, and delaying the 
> execution of the rest 10ms which gives some time to the browser to 
> handle other threads.
> Not the best thing, best would be handle these manipulation at backend 
> side.
> return function() {
>         var ageclass = /\\bage\\b/,
>             dateclass = /\\bdate\\b/,
>             nodes = document.getElementsByClassName ? 
> document.getElementsByClassName('age')
>                                                     : 
> document.getElementsByTagName('*'),
>             length = nodes.length, i=0;
>         // delayed execution for responsiveness
>         !function  process() {

By the way, that bang to turn the function declaration into an 
expression is a way too cryptic for me. Heck, even many of my colleagues 
who work with the language daily wouldn’t know what is going on there. 
It’s better to just invoke the function explicitly using process(); 
after the declaration. Or at least surround it with ().

Do realise that there are many developers working on this project which 
have only little JavaScript experience, and are not aware of the 
intricacies of the language. Keeping the code simple and understandable 
is therefore an important goal, so that they do not have to turn to 
JavaScript experts every time something needs fixing.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120926/7460c92a/attachment.html>

More information about the Mercurial-devel mailing list