|
Re: Import speed issue: msg#00057python.cheetah
On Tue, Oct 21, 2003 at 07:16:46PM -0400, Brian B. wrote: > $ time python -c 'from sys import exit' > python -c 'from sys import exit' 0.05s user 0.03s system 102% cpu 0.076 total > $ time python -c 'import Cheetah' > python -c 'import Cheetah' 0.06s user 0.01s system 86% cpu 0.081 total That just imports the package so it doesn't do hardly anything. > $ time python -c 'from Cheetah import Template' > python -c 'from Cheetah import Template' 0.58s user 0.05s system 97% cpu > 0.647 total That executes the Template module, which as Tavis said is quite involved. I'm getting 1.5 seconds to import the module from disk the first time, and 0.75 seconds to import it from OS memory buffers thereafter. That's with AMD-K6/450 and Linux Debian. It used to take longer to instantiate and fill templates, but that's pretty instantaneous now. So the amount of efficiency we've squeezed in is about as far as we can get. -- -Mike Orr (aka. Sluggo), mso@xxxxxx (iron@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Cheetah and PEP255, Mike Orr |
|---|---|
| Next by Date: | Re: Cheetah and PEP263, JZ |
| Previous by Thread: | Re: Import speed issue, Tavis Rudd |
| Next by Thread: | Re: Import speed issue, Dave Kirby |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |