[Bins] new functionality: search engine

Jérôme SAUTRET jerome at sautret.org
Thu Aug 11 19:58:35 BST 2005


On Thu, Aug 11, 2005 at 12:16:59PM +0000, Kim Minh Kaplan wrote:
> Jérôme SAUTRET <jerome at sautret.org> writes:
> 
> >Actually, the search data is 552K big. This kind of data can be easily 
> >compressed, but I don't think I can uncompress it in javascript. If 
> >anyone has an hint about this problem, let me know. 
> 
> 
> I think you have two passes you can try (and even combine).  First you 
> could compress the data has you just mentionned.  Implementing this in 
> javascript should not be that difficult.  But I think in the long 
> term, you could split your search data in multiple small files, say 
> one file for each first letter of a search term (or for the two first 
> letter if the search data grows too big). And then download only the 
> needed part using AJAX like mecanism.


OK, I've found an easy and efficient compression method: apache's
mod_deflate ;-). The file is now 47K, which is acceptable. Of course,
this won't work with older browsers (without gzip support), but I guess
those browsers won't support DOM and thus won't be able to use the
search feature.

For the idea of splitting in several files, I have to use an index to
do this. Currently, this is not the case, I just perform a sequential
search. Maybe I'll use an index in the future.

-- 
Jérôme SAUTRET (Jerome @ SAUTRET.org)           http://SAUTRET.org
Key 0x95D463F3 fingerprint 3B69 3B60 4D32 B8DF 2BF3 8035 5036 D41A 95D4 63F3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://www.email-lists.org/pipermail/bins/attachments/20050811/18ebc729/attachment.bin


More information about the Bins mailing list