Overview
M-Files first checks if the file can be found from the client's cache on the user's computer. If it is not found, the M-Files Server will generate a PDF preview of the document as a one-time operation for the first time. Subsequent previews will render faster than on the first run.
The speed of this conversion is dependent on the source material, and it can be resource-intensive. It may take time if the source document's contents don't convert to a PDF effectively. An extreme example would be a case where previewing a less than optimally formatted Microsoft Excel document could result in a PDF preview file with thousands of pages and file size in tens of megabytes. On the other hand, some other types of documents would turn up in preview quickly.
Details
There are several ways to alter this behavior and some enhancements in the M-Files product that can help for such situations:
- As the end user, you can disable Highlight Search Hits via the View menu in M-Files Desktop. This skips the PDF conversion step for searches for the preview.
- Ensure that the preview generation upon check-in is enabled. It has been enabled by default since version 22.1 (see more here, as very active vaults may have a performance hit from it). This feature generates a PDF preview when the document is checked in, thereby speeding up the first preview that is needed.
- Disable the M-Files PDF conversion previewer and use only the local OS. See here and here.
- Consider reducing the time or size limits for built-in PDF Conversion under Configuration > PDF Conversion - at least for specific types that tend to take long in your environment (e.g., large Excel files). This can show a warning to the user sooner and make them open the file with the regular program. You can combine this with the previewer settings above.
You can also refer to the article "Monitoring and Optimizing M-Files Performance.pdf " - it offers some important factors that affect performance and some administrative tasks for addressing poor performance that may also contribute to slowness in preview generation.
