Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 169B011D11 for ; Sat, 20 Sep 2014 17:23:19 +0000 (UTC) Received: (qmail 73458 invoked by uid 500); 20 Sep 2014 17:23:19 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 73405 invoked by uid 500); 20 Sep 2014 17:23:18 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 73390 invoked by uid 99); 20 Sep 2014 17:23:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Sep 2014 17:23:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.190.138.221] (HELO mm-mailgw.meyle-mueller.de) (195.190.138.221) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Sep 2014 17:23:14 +0000 Received: from [172.16.10.102] (port=57004 helo=mm-mailserver-7.mum.intra) by mm-mailgw.meyle-mueller.de with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1XVON0-0004kE-1n for dev@chemistry.apache.org; Sat, 20 Sep 2014 19:22:50 +0200 Received: from MM-MAILSERVER-8.mum.intra (172.16.10.103) by mm-mailserver-7.mum.intra (172.16.10.102) with Microsoft SMTP Server (TLS) id 15.0.775.38; Sat, 20 Sep 2014 19:22:27 +0200 Received: from MM-MAILSERVER-8.mum.intra ([fe80::f811:4bd2:f560:dcca]) by mm-mailserver-8.mum.intra ([fe80::f811:4bd2:f560:dcca%24]) with mapi id 15.00.0775.031; Sat, 20 Sep 2014 19:22:09 +0200 From: Sascha Homeier To: "" Subject: Re: DotCMIS query Thread-Topic: DotCMIS query Thread-Index: Ac/UZbOJLmQTE5JGRsqnVPfADyX1egAkbSqR Date: Sat, 20 Sep 2014 17:22:08 +0000 Message-ID: References: <11C38D06483090499C6702D217CA4B34EC6AEF@KDCBCHMBX2.bchydro.adroot.bchydro.bc.ca> In-Reply-To: <11C38D06483090499C6702D217CA4B34EC6AEF@KDCBCHMBX2.bchydro.adroot.bchydro.bc.ca> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Rajendra, This sounds like the effect Florian told me about when using non chunked Tr= ansfer encoding (due to the required length the document is prepared in Mem= ory at whole). Maybe a Transfer in chunks will help you. I do not know about DotCmis but M= aybe there is an Option to create a partial content Stream or sth. In that = way. Cheers Sascha > Am 20.09.2014 um 10:58 schrieb "Sethi, Rajendra" : >=20 > Hi there, >=20 > I am working on SharePoint 2010 (CMIS client) to FileNet P8 5.1 (CMIS Ser= ver 1.0) content transfer using CMIS and here we are implementing DotCMIS l= ibrary in SharePoint to initiate file transfer requests targeted for FileNe= t. We have large files transfer scenarios and while doing some performance = tests, memory consumption on SharePoint (the client) is too high. I would l= ike your help to suggest how could I improve these transfers. >=20 > The implementation is using AtomPub binding and streaming the file conten= t from a document available in SharePoint library. During the SetContentStr= eam operation, Modified Physical Memory equivalent to the size of the file = being transferred becomes Not Available (for example, for 2 gb file, about = 2 gb memory becomes Not Available) and hence the Free Memory on the server = is reduced by that file size. Once the transfer operation is completed, thi= s physical memory becomes available once again. >=20 > We are trying to achieve a high performance solution and may consider mul= tiple threads to transfer a few files simultaneously. If each process is bl= ocking a large chunk of memory, we will be limited to 1 or max 2 threads at= a time. Is there any code tuning or correction required in the connection/= session object to achieve better results? Please consider the code provided= below. >=20 > This is the code from CMIS client (SharePoint ) --- >=20 > Dictionary parameters =3D new Dictionary(= ); >=20 > // RESTful > parameters[DotCMIS.SessionParameter.BindingType] =3D BindingType.AtomPub; > parameters[DotCMIS.SessionParameter.AtomPubUrl] =3D ""; >=20 > parameters[DotCMIS.SessionParameter.RepositoryId] =3D ""; > parameters[DotCMIS.SessionParameter.User] =3D ""; > parameters[DotCMIS.SessionParameter.Password] =3D ""; >=20 > parameters[DotCMIS.SessionParameter.Compression] =3D "true"; // turn on H= TTP response compression > parameters[DotCMIS.SessionParameter.ConnectTimeout] =3D "600000"; // 10 m= inutes // HTTP connect timeout in milliseconds; -1 for infinite > parameters[DotCMIS.SessionParameter.ReadTimeout] =3D "600000"; // 10 minu= tes // -1 for infinite >=20 > SessionFactory factory =3D SessionFactory.NewInstance(); > session =3D factory.CreateSession(parameters); >=20 >=20 > IFolder cmisFolder =3D (IFolder)session.GetObjectByPath("/cmis test"); >=20 > SPFile file =3D SPContext.Current.Web.GetFile("http:///sites/TS/S= hared%20Documents/bigfile.txt"); > Dictionary properties =3D new Dictionary(= ) > { > {"cmis:name", file.Title }, > {"cmis:objectTypeId", "cmis:document"}, > }; >=20 > Stream stream =3D file.OpenBinaryStream(SPOpenBinaryOptions.SkipVirusScan= ); >=20 > IDocument doc =3D cmisFolder.CreateDocument(properties, null, VersioningS= tate.CheckedOut); >=20 > IObjectFactory objectFactory =3D session.ObjectFactory; > ContentStream contentStream =3D (ContentStream)objectFactory.CreateConten= tStream(file.Title, file.Length, "text/plain", stream); >=20 > doc.SetContentStream(contentStream, true, false); > doc.CheckIn(true, null, null, "optional check in comment"); >=20 >=20 > Thanks > Rajendra Sethi > ________________________________ > This email and its attachments are intended solely for the personal use o= f the individual or entity named above. Any use of this communication by an= unintended recipient is strictly prohibited. If you have received this ema= il in error, any publication, use, reproduction, disclosure or disseminatio= n of its contents is strictly prohibited. Please immediately delete this me= ssage and its attachments from your computer and servers. We would also app= reciate if you would contact us by a collect call or return email to notify= us of this error. Thank you for your cooperation. > -BCHydroDisclaimerID5.2.8.1541