flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Talsma <sc...@talsma.tv>
Subject Re: autosuggest component for lengthy xmls
Date Mon, 01 Apr 2013 14:39:28 GMT
I'll worked w/similar components.  One thing that helps is to have each
keypress schedule an autocomplete to take place in the future (e.g. in
100ms), and each keypress resets/restarts the timer.  That way, if the user
knows where they are going, you are not unnecessarily doing processing.

Also, does the Flex client really need to know about that much data?  I
would also consider reducing the the record size if you can.  An
autosuggest should is supposed to help the user, so returning hundreds of
rows that they have to scroll through defeats this.

Can you bust up the data in to a server-filtered dataset, which is further
refined by client-side logic?

For example, require a minimum number of characters to begin an
autocomplete search (e.g. 2+).  That lets your database reduce that 900k to
several thousand (or hundreds of rows?).  Maybe even better, have the db
routine first calculate the number of rows that your search string would
return, and if it exceeds a certain threshold  return 0 rows, w/an
information message: "60427 results pending").

Granted, this shifts a lot of load to the server/db.  I don't know if that
possibile in your scenario.  Also, if you can use AMF instead of XML, you
will cut down on deserialization time.

Once you have the results from an search that is initially filtered by the
server, you can use your existing client-side filterFunction() for further
refinement as additional characters are entered.

On Sun, Mar 31, 2013 at 9:40 AM, Nitin Gopi <nitin.gopi@gmail.com> wrote:

> I have a autosuggest library which I have been using in my project. I now
> have a textinput where I have to use this library. But this time the input
> has around 900,000 records. i.e, an xml having 900,000 nodes. When I used
> it with the component, it works but it has become slow probably because of
> filtering of the xmllistcollection on each key press. On each key press it
> takes 2-3 sec for refreshing. Is there a way to speed up the process?
> I tested this xml on the local machine.
> --
> You can only depend on yourself. The cavalry ain't coming.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message