/    Sign up×
Community /Pin to ProfileBookmark

design question for autofilter table

Hi all,
I’m going to use a bit of an analogy to describe what I’m looking to do; in most respects it’s the same and definitely easier to follow.
You know how in itunes, the search window at the top right refines the results below based on keywords in artist, album, or songname in realtime? I’m needing to do something like this.
There will be between 0 and approx 30,000 records in the db (or xml file, depending on how I do this). Just like with itunes, the db will rarely change (writing this, I’m realizing it’s uncannily similar). However, when it does change, I’d need to refresh the table, hopefully without reloading the entire data set..maybe just those that changed. The client side can sense when a reload is necessary.
I’d like the user to be able to scroll through ALL results, be it 10 if a distinctive search term is entered or all 30,000 is nothing is entered. I’m reluctant to paginate so that the scrollbar motion accurately reflects the number of results and so it doesn’t hang when it autoloads data when scrolling, for example.
It should be as fast as possible.

So now I’m not sure what to do. Querying a db with a search term and callback()ing the results might be noticeably slow, but having js deal with up to 30,000 rows might not be the best thing either.

What do you suggest?

For now, I unfortunately have to avoid all things like jquery, but if you have only examples with those that’s alright.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Larry_BattleJul 11.2009 — jQuery is your best bet.

http://rikrikrik.com/jquery/quicksearch/

Your program is mostly already written, you just need to search for it.
Copy linkTweet thisAlerts:
@CoolnessauthorJul 11.2009 — hiya Larry

What about with a huge number of rows? Unless I'm missing what one of the functions in the background code does, it looks like it's sorted clientside. Maybe I should just compare which is faster: clientside filtering, or serverside autopagination-on-scroll and filtering, or a combination of the two
×

Success!

Help @Coolness spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...