Export to GitHub

django-rcsfield - issue #5

Diff method optimizations in backends/bzr.py


Posted on Sep 20, 2008 by Swift Bird

In backends/bzr.py : mv 'import difflib' to the top of the file to keep from reimporting the library on every function call.

In linux:

Tab 1: (i)python Tab 2: strace -p 'pgrep' Tab 1: import difflib Tab 2: [ note import lookups ] <enter><enter><enter> Tab 1: import difflib

And there's always caching ... maybe something like http://www.djangosnippets.org/snippets/564/

Awesome addition to Django - Thank You!

Comment #1

Posted on Sep 20, 2008 by Happy Panda

(No comment was entered for this change.)

Comment #2

Posted on Sep 24, 2008 by Happy Panda

is fixed in r59. thanks for reporting. I will think about caching function results, sounds like a good idea.

Status: Fixed

Labels:
Type-Defect Priority-Medium