Source:
<code>private void storeContentResource(String rootId, ContentResource resource, ZipOutputStream out) throws Exception { String filename = resource.getId().substring(rootId.length(),resource.getId().length()); if(filename != null && filename.length()>0) { String filenameArr[] = filename.split(Entity.SEPARATOR); if (filenameArr.length > 1) { ContentCollectionEdit collectionEdit = (ContentCollectionEdit) ContentHostingService.getCollection(rootId+filenameArr[0]+Entity.SEPARATOR); ResourcePropertiesEdit props = collectionEdit.getPropertiesEdit(); String displayName = props.getProperty(ResourcePropertiesEdit.PROP_DISPLAY_NAME); try { <START> String uniqueId = UserDirectoryService.getUser(filenameArr[0]).getDisplayId(); <END> filename = displayName +"("+uniqueId+")"+ Entity.SEPARATOR + filenameArr[1]; }catch(UserNotDefinedException e) { LOG.warn("Not able to find user for id:"+filenameArr[0]); } } else { ContentCollectionEdit collectionEdit = (ContentCollectionEdit) ContentHostingService.getCollection(rootId); ResourcePropertiesEdit props = collectionEdit.getPropertiesEdit(); String displayName = props.getProperty(ResourcePropertiesEdit.PROP_DISPLAY_NAME); try { String uniqueId = UserDirectoryService.getUser(extractName(rootId)).getDisplayId(); filename = displayName + "(" + uniqueId + ")" + Entity.SEPARATOR + filenameArr[0]; }catch(UserNotDefinedException e) { LOG.warn("Not able to find user for id:"+extractName(rootId)); } } } ZipEntry zipEntry = new ZipEntry(filename); zipEntry.setSize(resource.getContentLength()); out.putNextEntry(zipEntry); InputStream contentStream = null; try { contentStream = resource.streamContent(); IOUtils.copy(contentStream, out); } finally { if (contentStream != null) { contentStream.close(); } } }</code><technical_language>this end user lookup for file included in export? is heavy caching of users this query DB for file I think</technical_language>

Target:
private void storeContentResource(String rootId, ContentResource resource, ZipOutputStream out) throws Exception { String filename = resource.getId().substring(rootId.length(),resource.getId().length()); if(ContentHostingService.isInDropbox(rootId) && ServerConfigurationService.getBoolean("dropbox.zip.haveDisplayname", true)) { try { filename = getContainingFolderDisplayName(rootId, filename); } catch(TypeException e){ LOG.warn("Unexpected error occurred when trying to create Zip archive:" + extractName(rootId), e.getCause()); return; } catch(IdUnusedException e ){ LOG.warn("Unexpected error occurred when trying to create Zip archive:" + extractName(rootId), e.getCause()); return; } catch(PermissionException e){ LOG.warn("Unexpected error occurred when trying to create Zip archive:" + extractName(rootId), e.getCause()); return; } catch (Exception e) { LOG.warn("Unexpected error occurred when trying to create Zip archive:" + extractName(rootId), e.getCause()); return; } } ZipEntry zipEntry = new ZipEntry(filename); zipEntry.setSize(resource.getContentLength()); out.putNextEntry(zipEntry); InputStream contentStream = null; try { contentStream = resource.streamContent(); IOUtils.copy(contentStream, out); } finally { if (contentStream != null) { contentStream.close(); } } }