You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Crivellaro <mc...@optasportsdata.com> on 2011/04/20 11:47:20 UTC

GenericFileOperations optimization

Hi,
when using camel as FTP/SFTP producer the exchange process is taking longer
time when many files are stored in the destination folder.

This should be related to the operations.existsFile calls being processed by
the method.

At the moment GenericFileProducer.processExchange is calling twice
operations.existsFile(target), why not 
calling it once caching its value?


Camel 2.8-SNAPSHOT sftp exchange process appears to take longer than in
Camel 2.5, the only difference I can spot is the lock acquired on the file,
in the usecase I have there is no need to acquire a lock on the file, would
it be possible to introduce this as an component option?



--
View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperations-optimization-tp4315363p4315363.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: GenericFileOperations optimization

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Apr 20, 2011 at 1:43 PM, Marco Crivellaro
<mc...@optasportsdata.com> wrote:
> Thank you, what about the second point about lock?
>

The lock is very cheap as it only prevents you from writing to the
*same* file concurrently, such as when you append to an existing file.
So there should be no bottleneck there.



> --
> View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperations-optimization-tp4315363p4315567.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: GenericFileOperations optimization

Posted by Marco Crivellaro <mc...@optasportsdata.com>.
Thank you, what about the second point about lock?

--
View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperations-optimization-tp4315363p4315567.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: GenericFileOperations optimization

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Apr 20, 2011 at 11:47 AM, Marco Crivellaro
<mc...@optasportsdata.com> wrote:
> Hi,
> when using camel as FTP/SFTP producer the exchange process is taking longer
> time when many files are stored in the destination folder.
>
> This should be related to the operations.existsFile calls being processed by
> the method.
>
> At the moment GenericFileProducer.processExchange is calling twice
> operations.existsFile(target), why not
> calling it once caching its value?
>

Yeah that's possible. I will try to do that.

>
> Camel 2.8-SNAPSHOT sftp exchange process appears to take longer than in
> Camel 2.5, the only difference I can spot is the lock acquired on the file,
> in the usecase I have there is no need to acquire a lock on the file, would
> it be possible to introduce this as an component option?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperations-optimization-tp4315363p4315363.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/