Hi.
I'm writing a mail client that filters/manages mail according to a Perl
script, and I'm having trouble with speed. What my mail client does is
construct two large strings (char * 's) and send them to the perl
interpretter using perl_eval_sv(); The first string is some initialization
data, ie: $from is the from field, $subject is the subject field, etc, and
the second char* is the user's script.
Currently, both these scripts are being executed once per message, so when
the mail accounts reach 1000 or so, things get rather slow, and I'm trying
to speed this up.
What I'd like to know is:
# The first string simply tells the perl interpretter to assign some scalers
to values. Is there another way of doing this without creating a script? ie:
a function I can call to assign perl scalers to strings?
# The user's script obviously doesn't change for each message. At the moment
the perl_eval_sv() function is having to parse the string and convert it to
something interpretable every time. Is there a way I can convert it to perl
byte codes at the start, hence only parse the string once?
Hope someone experienced in using the Perl C API can help me. Thanks.