Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fsnotify if using Directory and expose CompileTemplates #93

Merged
merged 2 commits into from
May 26, 2021

Commits on May 12, 2021

  1. Further improve locking (RWMutex version)

    As a second step improving unrolled#90, only lock when absolutely necessary
    and reconstruct functions to ensure that the current templates are
    referenced in the helper func instead of a global reference.
    
    Closes unrolled#91
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 12, 2021
    Configuration menu
    Copy the full SHA
    d086b3e View commit details
    Browse the repository at this point in the history
  2. Use fsnotify if using Directory and expose CompileTemplates

    If setting IsDevelopment, if we can, use an FsWatcher to recompile the
    templates in a separate goroutine. This should definitely increase the
    performance of the Development server.
    
    In order to make Asset based Renders have the same improvement - now
    that render compilation properly locks the templates we can expose the
    CompileTemplates function and allow downstream users to call this
    independently when their templates need recompilation.
    
    Contains unrolled#92
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 12, 2021
    Configuration menu
    Copy the full SHA
    ebf8856 View commit details
    Browse the repository at this point in the history