Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicating Processing Tasks #247

Merged
merged 1 commit into from
May 23, 2019
Merged

Conversation

kean
Copy link
Owner

@kean kean commented May 22, 2019

  • Add isProcessingDeduplicationEnabled option:

      `false` by default. An experimental feature. When enabled, pipeline
      will avoid any duplicated work when processing images. For example,
      let't take this two requests:
      
      ```swift
      let url = URL(string: "http://example.com/image")
      pipeline.loadImage(with: ImageRequest(url: url, processors: [
          ImageProcessor.Resize(size: CGSize(width: 44, height: 44)),
          ImageProcessor.GaussianBlur(radius: 8)
      ]))
      pipeline.loadImage(with: ImageRequest(url: url, processors: [
          ImageProcessor.Resize(size: CGSize(width: 44, height: 44))
      ]))
      ```
      
      Nuke will load the image data only once, resize the image once and
      apply the blur also only once. There is no duplicated work done at
      any stage.
      
      - WARNING: When enabled each intermediate processed image will be
      stored in disk data cache if it is enabled.
    

@kean kean changed the title Deduplicating Processing Tasks Deduplicating Processing Tasks (Experimental) May 22, 2019
@kean kean force-pushed the deduplicating-processing-tasks branch from d3b9d56 to 67d5ea9 Compare May 22, 2019 20:47
@kean kean merged commit 093c94f into nuke8 May 23, 2019
@kean kean deleted the deduplicating-processing-tasks branch June 2, 2019 12:21
@kean kean changed the title Deduplicating Processing Tasks (Experimental) Deduplicating Processing Tasks Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant