This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[Solved]: Using dccsend causes extreme application lag.

Help for those learning Tcl or writing their own scripts.
Post Reply
T
TheVillageIdiot
Voice
Posts: 2
Joined: Sun Apr 10, 2011 12:43 am

[Solved]: Using dccsend causes extreme application lag.

Post by TheVillageIdiot »

Hi there guys/gals.

I'm coding a tcl script to dcc send files that users in channel trigger with a command. ie. !send file.txt

The script runs fine in and of itself. However, when the dccsend command is run it hogs 100% of the CPU for around 30 seconds... during that time, it wont respond to commands, etc.

Any reason for this?? Or is there a way i can avoid it?

Cause it could kill my bot if enough people tried to get files off it.

I've also tried using the after command - which has the same effect once it's triggered.

Code: Select all

set timeb [clock clicks -milliseconds]
dccsend $filepath $nick
set timec [clock clicks -milliseconds]


Result: timeb: 1302413656191 Timec: 1302413679132
TimeB - TimeC = 22,941 = 22.9 Seconds.
I'm using the latest version of eggdrop and TCL 8.4.

Any help would be appreciated. :D

Edit:

The file is around 1GB... i tried a much smaller file, and there wasn't as much lag.

So i checked the source code, and it seems there is code that can create a temporary copy of the file. I back tracked it in the source code, and eventually found the config setting "copy-to-tmp" which i then set to 0

Problem solved. :)


Regards,

TheVillageIdiot
Post Reply