Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18285

camel-file - Lazy-loading for file length and last modified attributes for faster performance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.18.0
    • 3.18.1, 3.19.0
    • camel-file
    • None
    • Unknown

    Description

      In network-mounted drives, a user can experience long processing time due to File#length and File#lastModified large invocation time.

       

      Use case: 

      There is a network-mounted drive. A user is polling a directory with thousands of files inside, but only needs to process few of them. 

       

      Current behaviour:

      File length and last modified attributes are read for each such file, seriously slowing the processing time.

       

      Expected behaviour:

      File length and last modified attributes are read only when needed.

       

      Affected method is FileConsumer#asGenericFile. A solution for this can be to load these two attributes lazily.

      Attachments

        Issue Links

          Activity

            People

              rnetuka Radovan Netuka
              rnetuka Radovan Netuka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: