[plt-scheme] firefox locking up 15 seconds for each plt documentation search

From: Henk Boom (henk at henk.ca)
Date: Sun Jun 7 12:53:46 EDT 2009

2009/6/7 Eli Barzilay <eli at barzilay.org>:
> On Jun  7, Henk Boom wrote:
>> Why not keep only the identifier and module names in the main index,
>> then when the user clicks on the link get the html information from
>> a .js file based on a hash of the name? Just from looking at the
>> index file it seems that this would shrink it quite a bit.
> * Note that as soon as you stop typing, it starts a search, and to
>  display the results it will need the rest of the information.  (You
>  could argue for changing that interface though, and make it require
>  clicking some search button or hitting enter -- but see below.)
> * If the hashes are good, it means that results will be distributed
>  nicely over all sub-files, which means that an average batch of
>  results will hit all of them, so you'll end up loading all data
>  anyway, and possibly slower, since it'll neead to read a file, and
>  merge the data into the main index vector, with all the accounting
>  that it implies.
> * Another problem is what I mentioned earlier -- it requires runtime
>  loading of files, which can be a pain when used with local pages.
> * In addition, there are additional bits of information that are
>  needed:
>  - What's the type of the entry (eg, you can use `M:' to search only
>    for bindings)?
>  - Which module is it coming from (the full version of that operator
>    is `M:<module>' to restrict searches only for bindings in matching
>    modules)?
>  - Which manual is it coming from (the `T:' operator makes the search
>    specific to a manual)?

Ah, I see it's more complicated than I thought. I can reply to some of
the points you bring up, but not all:

Why does it need the rest of the information to display the results?
If you only fetch the URL when the user clicks the link it seems that
only the name and the module are needed for display. This means that
typically you would need only to load a single one of the hash .js

If you include the module name and the manual name (perhaps by index)
in the main .js file then M: and T: should work fine as far as I can


Posted on the users mailing list.