You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zeripath bb0ff77e46
Share HTML template renderers and create a watcher framework (#20218)
The recovery, API, Web and package frameworks all create their own HTML
Renderers. This increases the memory requirements of Gitea
unnecessarily with duplicate templates being kept in memory.

Further the reloading framework in dev mode for these involves locking
and recompiling all of the templates on each load. This will potentially
hide concurrency issues and it is inefficient.

This PR stores the templates renderer in the context and stores this
context in the NormalRoutes, it then creates a fsnotify.Watcher
framework to watch files.

The watching framework is then extended to the mailer templates which
were previously not being reloaded in dev.

Then the locales are simplified to a similar structure.

Fix #20210 
Fix #20211
Fix #20217

Signed-off-by: Andrew Thornton <art27@cantab.net>
2 years ago
..
source Fix typo in source (#20723) 2 years ago
auth.go Remove dependent on session auth for api/v1 routers (#19321) 2 years ago
auth_test.go format with gofumpt (#18184) 2 years ago
basic.go Move some files into models' sub packages (#20262) 2 years ago
group.go Share HTML template renderers and create a watcher framework (#20218) 2 years ago
httpsign.go Implement http signatures support for the API (#17565) 2 years ago
interface.go Share HTML template renderers and create a watcher framework (#20218) 2 years ago
oauth2.go Move some files into models' sub packages (#20262) 2 years ago
reverseproxy.go auth/reverseproxy: Add support for full name (#20776) 2 years ago
session.go format with gofumpt (#18184) 2 years ago
signin.go Restore user autoregistration with email addresses (#19261) 2 years ago
source.go Refactor auth package (#17962) 3 years ago
sspi_windows.go Share HTML template renderers and create a watcher framework (#20218) 2 years ago
sync.go Refactor auth package (#17962) 3 years ago