egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved]: Using dccsend causes extreme application lag.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
TheVillageIdiot
Voice


Joined: 10 Apr 2011
Posts: 2

PostPosted: Sun Apr 10, 2011 1:09 am    Post subject: [Solved]: Using dccsend causes extreme application lag. Reply with quote

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:

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. Very Happy

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. Smile


Regards,

TheVillageIdiot
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber