<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Op 25-9-2012 23:57, Martin Scotta
schreef:<br>
</div>
<blockquote
cite="mid:CA+tCNCU6u2S-73+2z4RN4kVEBrQeVEsLsSRR0Z7nEOE5+EsAJA@mail.gmail.com"
type="cite">this works fine for me...<br>
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.<br>
<br>
Not the best thing, best would be handle these manipulation at
backend side.<br>
<br>
<span style="font-family:courier new,monospace">return function()
{<br>
var ageclass = /\\bage\\b/,<br>
dateclass = /\\bdate\\b/,<br>
nodes = document.getElementsByClassName ?
document.getElementsByClassName('age')<br>
:
document.getElementsByTagName('*'),<br>
length = nodes.length, i=0;<br>
// delayed execution for responsiveness<br>
!function process() {</span><br>
</blockquote>
<br>
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
().<br>
<br>
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.<br>
<br>
~Laurens<br>
<br>
</body>
</html>