The situation:
an eggdrop sitting in a busy chatroom.. many users sending it commands all at the same time.
the commands are sent in a msg window, which require the bot to reply with a list- varable length/size
The problem:
user one sends a query for "tainted love" ,
user two sends a query for "beatles"
user three sends a query for "all throghh the night"
user one will get his list right away, user two will also get his list realitively quickly, but user 3 will not get ANYTHING untill user 2's list finishes displaying.. although the logic, internally, is quick.. the "having to write it all out to the server" really SLOWS DOWN the entire process.. and since "beatles" will render over 100 items, user three will most likely GIVE UP before he waits out 2 to 5 MINUTES for his list!
I have set a limit to 20 items- but theres still a realitively long wait time which woud double for each user past the previous... and, the limit also cuts off a possale querry for "item 21" and beyond... (an undesired side-effect)
the solution:
As I mentioned above, the logic itself is realitively fast- but the writing out to the server is what takes the time.. so if there was a way to "seperate", isolate or "multi-thread" the server write-out process.. so that each user gets his list at the same time as each other user.. this could work very nicely!
unless someone has a better idea how I can do this,
some things to note:
The database is *NOT* mysql or any form of established database- it is managed by a playout system and prepriortary to it.. it can ONLY be accessed through a web-channel (done internally) where its cached in a varable and parsed..
query:
!search <song/artsit> -> "arg"
socket -> push command $arg -> localhost -> webserver -> playout
return:
Playout -> webserver -> localhost-> eggdrop -> socket -> "GetInfo"
GetInfo -> parsers -> "Song", "Show", "DJ", (etc) -> putserv $nick $song1, Song 2, etc"
each result (song 1, song 2, etc) is a new write to putserv
I could display the code, but its really "involved" I don't want to post it "freely" however since it contains "sensitive elements" and if I remove/substitute said elements, the code wouldn't make sense.. also, the code resides on an entirely-different machine which does NOT contain a browser or any way to access the web.. I'd have to use "sneakernet" to gain the file I won't do the work if it won't be seriously-considered

-DjZ

