mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-10813: MimetypeMap.guessMimetype consumes 30% of file upload time
- Only construct the detector once when the configuration is provided - Don't guess mimetypes when the mimetype has already been provided - All of the above need reviewing or refixing as long as the performance is not lost git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31222 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -242,6 +242,8 @@ public class FileFolderPerformanceTester extends TestCase
|
||||
NodeRef nodeRef = fileInfo.getNodeRef();
|
||||
// write the content
|
||||
ContentWriter writer = fileFolderService.getWriter(nodeRef);
|
||||
writer.setEncoding("UTF-8");
|
||||
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
writer.putContent(dataFile);
|
||||
}
|
||||
// done
|
||||
|
Reference in New Issue
Block a user