Thanks again for the advice, and let me tell you it made a huge
difference when testing with 2,000 rows vs. 200. Kangax's code made
for a very quick sort, but trying to do so at each keyup was a killer.
Here's where I ended up in the end:
var list = $$("#delegates li");
By using the keyup event you can avoid the conditions to check for
change, if the user has pressed and released a key on the input then
the value has changed. Also it is very wise to add the timeout, your
users will thank you.
document.observe("dom:loaded", function() {
var list = $$("#listA
On Dec 1, 2008, at 11:01 PM, kangax wrote:
>> This behaves the way you would want it to -- so fast that the change
>> doesn't register until the list starts getting very short.
>
> I think something along these lines could be faster:
>
> document.observe("dom:loaded", function() {
>
> var list
On Dec 1, 1:43 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> I've been working on a problem today and wanted to share the results
> here. I have a very tall list of authors on a page, and wanted to make
> a simple filter field where you could type in a few characters of the
> name and have the
Thanks, both good ideas. Here's what I was thinking:
On Dec 1, 2008, at 2:27 PM, Matt Foster wrote:
>
> I'd say your DOM traversals might add quite a bit of weight to your
> filter. Why select the LI element if you're really looking at its
> child A element's innerHTML property ?
> Select those
I'd say your DOM traversals might add quite a bit of weight to your
filter. Why select the LI element if you're really looking at its
child A element's innerHTML property ?
Select those nodes and skip the execution of down, should speed things
up quite a bit.
Also if you're using a text input co
Wow, thanks! Had no idea.
Walter
On Dec 1, 2008, at 1:46 PM, Diodeus wrote:
>
> "Performant" isn't a word.
>
> http://weblogs.asp.net/jgalloway/archive/2007/05/10/performant-isn-t-a-word.aspx
--~--~-~--~~~---~--~~
You received this message because you are subsc
"Performant" isn't a word.
http://weblogs.asp.net/jgalloway/archive/2007/05/10/performant-isn-t-a-word.aspx
On Dec 1, 1:43 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> I've been working on a problem today and wanted to share the results
> here. I have a very tall list of authors on a page,