Move some one-time used imports to the user location.
Wed Feb 22 04:47:15 UTC 2006 Alberto Bertogli <albertogli@telpin.com.ar>
* Move some one-time used imports to the user location.
As a minor but noticeable optimization to darcsweb's load time, move the
importing of sha and email.Utils modules to the place where they're used (only
one in both cases).
This takes the time spent on imports from 0.027s to 0.021s, which will
probably be slightly noticeable on slower machines, reducing the time taken by
a cache hit from 0.030s to 0.024s (on misses it doesn't make a difference).
{
hunk ./darcsweb.cgi 17
-import sha
hunk ./darcsweb.cgi 22
-import email.Utils
hunk ./darcsweb.cgi 482
+ import sha
hunk ./darcsweb.cgi 1870
+ import email.Utils
}