From: Rick_Jasper/Delphion%<DEL...@de...> - 2002-01-10 20:25:41
|
David Blackstone wrote, >> If you have the third edition camel, look up the command for how to >> profile your code. I believe it involves running a command called dprofpp ... I know exactly which line of Perl I'm on. It's the expect() call that is waiting for the command output to get all transferred. Roland Giersig wrote, >> Ugh, and there is no other way to do that? Is it really an interactive >> application? How about just doing a ssh command and capture the >> output? Or having the remote system dump that data to a disk and then >> transfer that with scp? Yes, this is the approach I decided to take and it works fine. I posted the question in order to understand what Expect was doing under the covers, why it was so slow, and whether or not there was anything I could tweak to speed things up. Yes, I can code around it, but this provides me a learning opportunity to better understand Expect. Also to find better learning material. >> That's no wonder. Expect keeps a buffer for matching, and if you >> do not set max_match ... I tried setting max_match to 600MB. It didn't help at all. Even if I wasn't trying to match anything, the data transfer was very slow. >> IMHO your best bet is to change the approach to the problem, see my suggestions above. I agree, and that's what I am doing, but I'd still like to know if there's anything I can do to speed up Expect's data collection. It sounds like no, there isn't. Rick Jasper |