|
From: Ron P. <th...@te...> - 2001-04-15 11:23:42
|
On Sun, 15 Apr 2001, Michael Hudson wrote: > > So I've been attempting to get ICQLIB in my software. > > Fair warning; I don't really know all that much about iclib (though I did > get Python bindings written & got them to work). NP. > > It connects, then the hard drive gets accessed wildly. > > Are you running out of memory (ie. is the hard disk access VM thrashing)? > What OS? Nah, my contact list counter (for sending the list) was overrunning the end of the list. So icqlib was storing loads of useless entries in its own list and that was using up tonnes of swap space. Heh heh. FIXEd. > AFAIK, icqlib doesn't touch the hard drive (except for file transfer > stuff, obviously). Yeah. So far it's working nicely. Have a temporary ICQ account created for testing and debugging (don't know how to create accounts with icqlib yet); logging in and out work, the userlist looks good. > > 6) continuously call icq_Main in a loop, no delays > > You don't really want to do that; you want to call icq_Main every 10 ms or > so (try usleep or nanosleep). Yeah, but that was a moot detail for the purposes at the time. I've got a usleep() working, but I'd rather use SIGALRM tuned to microseconds, and delay for 50,000 of those. (50ms). > Could your callbacks be leaking memory? That's about all I can think of. Checking out the icqlib source, I noted that all callbacks are nullified, so anything I don't use won't crash my program. <Phew.> > No, I think you can just implement the one's you're interested in; icqlib > checks for NULLs before calling the callbacks. > > HTH, but it might be better if someone with more iclib knowledge/intuition > spoke up... Your memory leak thing is always good to check out. No one's written up a decent icqlib tutorial, so I'm taking that task on. Once the basics are known, the whole development process is pretty simple. Save the user interface, of course. Heh. Still racking my brain about the best way to do that under console. (I'm thinking something like zicq would be nice, but have the userlist on the left hand side of the screen and have scrolling and filtering caps.) -- .--------------------------------------------. | Ron Poulton Caffeinate. | | EMail: thok at technologist.com Code. | | Web: http://www.thok.net Compute. | `--------------------------------------------' Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense. |