Skip to content

Conversation

@jmcarcell
Copy link
Member

BEGINRELEASENOTES

  • Use a cache for compiled jinja templates to reduce template compilation time.

ENDRELEASENOTES

Compiled templates are saved in /tmp, in files that contain their hash and this is useful for generating with the same configuration multiple times. They don't take much space. Modifying templates or macros applies to new runs. CMake configuration time is halved for me when having the schema evolution tests enabled.

THIS_DIR = os.path.dirname(os.path.abspath(__file__))
PYTHONBASE_DIR = os.path.abspath(THIS_DIR + "/../")
TEMPLATE_DIR = os.path.join(PYTHONBASE_DIR, "templates")
CACHE_DIR = os.path.join("/tmp", "podio", "jinja2_cache")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CACHE_DIR = os.path.join("/tmp", "podio", "jinja2_cache")
CACHE_DIR = os.path.join(os.environ.get("TMPDIR, "/tmp"), "podio", "jinja2_cache")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants