From 43abd5c3fbeafc8887447b51e6d2892f09786f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 16 Nov 2017 11:41:49 -0500 Subject: [PATCH] Memory leak investigation --- get_subtitle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/get_subtitle.py b/get_subtitle.py index 18e2c7baf..eb944391b 100644 --- a/get_subtitle.py +++ b/get_subtitle.py @@ -8,6 +8,8 @@ from get_general_settings import * from list_subtitles import * from utils import * +from memory_profiler import profile + # configure the cache region.configure('dogpile.cache.dbm', arguments={'filename': os.path.join(os.path.dirname(__file__), 'data/cache/cachefile.dbm')}) @@ -64,7 +66,7 @@ def wanted_download_subtitles(path): store_subtitles(path_replace(episode[0])) list_missing_subtitles(episode[3]) history_log(1, episode[3], episode[2], message) - +@profile def wanted_search_missing_subtitles(): db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) db.create_function("path_substitution", 1, path_replace)