Speeding up application startup
David Bolen
db3l at fitlinxx.com
Sat May 12 20:35:25 EDT 2001
"Mark Rowe" <mark21rowe at yahoo.com> writes:
> Thanks for the info. Here is the relevant code. It is definately the
> compiling of the expressions, because if i remove the compilation, it takes
> less than one second to load the expressions. Also, the reason why i
> compile all of the expressions at startup is that all my application does is
> check to see if any given string is either blocked or allowed, due to the
> expressions that it matches. So far, the only thing that i can do is sift
> through the expression file by hand, and alter the expressions to be
> slightly more general, therefore removing probably about 1/4 of them. I
> shall do this when i get time
One other thought - does your application do anything else during
startup that takes time but isn't purely CPU bound? If so, you could
load in the expressions, and spin off a worker thread to handle the
compilation while you do the other stages of your startup - thus
amortizing the compilation time over other delays (network startup,
waiting for a connection or whatever). Even if they don't fully
occupy the 15s, it might make the overall startup response appear faster.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list