Skip to content

Instantly share code, notes, and snippets.

@aronasorman
Last active August 28, 2015 16:41
Show Gist options
  • Save aronasorman/bceac4036dfc8e152f35 to your computer and use it in GitHub Desktop.
Save aronasorman/bceac4036dfc8e152f35 to your computer and use it in GitHub Desktop.
Line # Mem usage Increment Line Contents
================================================
92 @profile
93 def initialize_content_caches(force=False):
94 """
95 Catch all function to regenerate any content caches in memory that need annotation
96 with file availability
97 52.445 MB 0.000 MB """
98 138.328 MB 85.883 MB for lang in i18n.get_installed_language_packs(force=True).keys():
99 52.457 MB -85.871 MB logging.info("Preloading exercise data for language {lang}.".format(lang=lang))
100 66.004 MB 13.547 MB topic_tools.get_exercise_cache(force=force, language=lang)
101 66.004 MB 0.000 MB logging.info("Preloading content data for language {lang}.".format(lang=lang))
102 101.742 MB 35.738 MB topic_tools.get_content_cache(force=force, annotate=True, language=lang)
103 101.742 MB 0.000 MB logging.info("Preloading topic tree data for language {lang}.".format(lang=lang))
104 topic_tools.get_topic_tree(force=force, annotate=True, language=lang)
Line # Mem usage Increment Line Contents
================================================
92 52.3 MiB 0.0 MiB @profile
93 def initialize_content_caches(force=False):
94 """
95 Catch all function to regenerate any content caches in memory that need annotation
96 with file availability
97 """
98 216.1 MiB 163.7 MiB for lang in i18n.get_installed_language_packs(force=True).keys():
99 52.4 MiB -163.7 MiB logging.info("Preloading exercise data for language {lang}.".format(lang=lang))
100 94.6 MiB 42.3 MiB topic_tools.get_exercise_cache(force=force, language=lang)
101 94.6 MiB 0.0 MiB logging.info("Preloading content data for language {lang}.".format(lang=lang))
102 161.0 MiB 66.3 MiB topic_tools.get_content_cache(force=force, annotate=True, language=lang)
103 161.0 MiB 0.0 MiB logging.info("Preloading topic tree data for language {lang}.".format(lang=lang))
104 216.1 MiB 55.1 MiB topic_tools.get_topic_tree(force=force, annotate=True, language=lang)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment