On Wednesday, June 18, 2003, at 01:02 PM, Bob Mariotti wrote:

I have something that works but the timing is just tooooooo slow. I have a subroutine that communications with remote hosts. It simply passes a one line string as a request and receives back from 1 to 100+ lines of text in return.

I have a couple of suggestions.


Don't try to eyeball and guess where things might be slow. Use the
profiler ( Included with perl 5.8.0, or available on CPAN with older versions.
<http://search.cpan.org/author/ILYAZ/DProf-19990108/DProf.pm>
Also Unix tools like "time" or strace might be helpful.


Mixing buffered I/O (like <> and print()) and serial devices can be a recipe
for disaster. You may need sysread and syswrite. (on the other hand, you
may just need "select((select(CXIBIO), $|++)[0])")


_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to