Possible performance problem in MarkdownFormat plugin
The MarkdownFormat plugin recursively searches all directories for *.md files during Registration (in the Register() method).
We have some web applications, where we have thousands of (sub-)directories, e.g. in a data folder. This means, that the Register() method may take up to 60 seconds to scan for *.md files, thus slowing down the application startup.
We have one customer who reported a startup-delay of several minutes.
As far as I have seen (using ServiceStack 3.9.71), there is no way to restrict the folders being searched by the MarkdownFormat plugin.
In our case, the workaround was to simply disable the Markdown-Feature (since we are not using it).
But would it be possible to somehow optimize the process of finding markdown-templates? E.g:
- allow to exclude certain folders ("~/data" in our case)
- allow to exclude junctions (in our case, ~/data is a junction, pointing to an external directory, to prevent IIS from monitoring it)
- search for templates on-demand (not during startup)
This site is only for feature requests, please use StackOverflow for all v3 support questions. You can use MarkdownFormat.SkipPaths to skip scanning paths.
Martin Bischoff commented
SkipPaths doesn't seem to prevent the folder scanning. It just prevents loading the *.md file.