ShuffleBox / django-rcsfield

Automatically exported from code.google.com/p/django-rcsfield
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Diff method optimizations in backends/bzr.py #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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!

Original issue reported on code.google.com by wes.tur...@gmail.com on 20 Sep 2008 at 7:24

GoogleCodeExporter commented 9 years ago

Original comment by a...@rcs4u.de on 20 Sep 2008 at 7:50

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

Original comment by a...@rcs4u.de on 24 Sep 2008 at 9:38