Subj : efficient searchs
To : Ragnarok
From : Digital Man
Date : Sun Nov 27 2005 01:19 am
Re: efficient searchs
By: Ragnarok to DOVE-Net.Sync_JavaScript on Fri Nov 25 2005 05:29 pm
> hi !
> i begin to play with js
> i try to search in message base, but search one to one is poor performance
> do you have another code that search in the base with more speed?
> maybe some method more optimized?
> a global menssage base index?
> a gift from google? :)
>
> for (grp in msg_area.grp_list) {
> for (sub in msg_area.grp_list[grp].sub_list) {
> msg = new MsgBase(msg_area.grp_list[grp].sub_list[sub].code);
> if (msg.open()) {
> for (i=0;i< msg.total_msgs;i++) {
> mensaje = msg.get_msg_header(true,i);
> if (mensaje != null) {
> if (mensaje.subject.indexOf("hola") >= 0) {
> writeln(mensaje.from);
> writeln("
");
> writeln(mensaje.subject);
> writeln("
");
> }
> }
> else
> writeln ("error getting message");
> }
> msg.close();
> }
> else {
> writeln ("Error al abrir la base de mensajes: " +
> msg_base.grp_list[grp].
> }
> }
> }
Your script seems to just search the message subjects. This is slow?
digital man
Snapple "Real Fact" #176:
The first bike was called a hobbyhorse.
.