I've recompiled hypermail with profiling (added -pg to CFLAGS) to identify slow functions. It looks like the PushByte() function is the most expensive function in the entire program. What is this function's purpose, and what can be done to speed it up?
Output from "gprof hypermail":
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
27.20 7.71 7.71 842952460 0.00 0.00 PushByte 16.44 12.37 4.66 4033647 0.00 0.00 convcharsreal 10.83 15.44 3.07 4027419 0.00 0.00 unconvchars 10.69 18.47 3.03 136776370 0.00 0.00 PushString 6.81 20.40 1.93 140802033 0.00 0.00 PushNString 6.35 22.20 1.80 8060250 0.00 0.00 strsav 4.90 23.59 1.39 4025649 0.00 0.00 ConvURLs 2.82 24.39 0.80 3 266.67 356.67 compute_quoted_percent 2.05 24.97 0.58 3 193.33 6022.21 printbody 1.73 25.46 0.49 8099964 0.00 0.00 TrioParse 1.48 25.88 0.42 8051299 0.00 0.00 is_sig_start 1.23 26.23 0.35 7795337 0.00 0.00 remove_hypermail_tags 1.13 26.55 0.32 8099964 0.00 0.00 TrioFormatProcess 0.95 26.82 0.27 29592153 0.00 0.00 TrioOutStreamFile 0.85 27.06 0.24 8099964 0.00 0.00 TrioFormat 0.85 27.30 0.24 1 240.00 10213.75 parse_old_html 0.60 27.47 0.17 4026565 0.00 0.00 addbody 0.53 27.62 0.15 4025649 0.00 0.00 parseemail 0.42 27.74 0.12 12076948 0.00 0.00 isquote 0.39 27.85 0.11 12098182 0.00 0.00 emalloc 0.39 27.96 0.11 4033641 0.00 0.00 convchars 0.35 28.06 0.10 4025649 0.00 0.00 ConvURLsString 0.25 28.13 0.07 4025649 0.00 0.00 parseurl 0.21 28.19 0.06 12076948 0.00 0.00 get_quote_prefix 0.21 28.25 0.06 4019580 0.00 0.00 print_leading_whitespace 0.18 28.30 0.05 8070234 0.00 0.00 trio_fprintf 0.04 28.31 0.01 185043 0.00 0.00 TrioOutStreamStringMax 0.04 28.32 0.01 106133 0.00 0.00 TrioWriteString 0.04 28.33 0.01 2189 0.00 0.01 format_thread_info 0.04 28.34 0.01 13 0.77 2.25 print_all_threads 0.04 28.35 0.01 __umoddi3 0.00 28.35 0.00 1153068 0.00 0.00TrioWriteStringCharacter
Best regards.
Frank Received on Mon 22 Mar 2004 10:46:01 PM GMT
This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT