All Versions
28
Latest Version
Avg Release Cycle
26 days
Latest Release
292 days ago

Changelog History
Page 3

  • v8.0-rc.1 Changes

    June 12, 2019

    馃摎 Nuke 8 is the most powerful, performant, and refined release yet. It contains major advancements it some areas and brings some great new features. One of the highlights of this release is the documentation which was rewritten from the ground up.

    Cache processed images on diskNew built-in image processorsImagePipeline v2Up to 30% faster main thread performanceResult typeImproved deduplicationos_signpost integrationRefined ImageRequest APISmart decompressionEntirely new documentation

    馃摎 Most of the Nuke APIs are source compatible with Nuke 7. There is also a Nuke 8 Migration Guide to help with migration.

    Image Processing

    #227 Cache Processed Images on Disk

    馃殌 ImagePipeline now supports caching of processed images on disk. To enable this feature set isDataCacheForProcessedDataEnabled to true in the pipeline configuration and provide a dataCache. You can use a built-in DataCache introduced in Nuke 7.3 or write a custom one.

    Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.

    #243 New Image Processors

    Nuke now ships with a bunch of built-in image processors including:

    • ImageProcessor.Resize
    • ImageProcessor.RoundedCorners
    • ImageProcessor.Circle
    • ImageProcessor.GaussianBlur
    • ImageProcessor.CoreImageFilter

    There are also ImageProcessor.Anonymous to create one-off processors from closures and ImageProcessor.Composition to combine two or more processors.

    #245 Simplified Processing API

    馃憤 Previously Nuke offered multiple different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:

    let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )
    

    Processors can also be set using a respective mutable processors property.

    Notice that AnyImageProcessor is gone! You can simply use ImageProcessing protocol directly in places where previously you had to use a type-erased version.

    #229 Smart Decompression

    0锔忊儯 In the previous versions, decompression was part of the processing API and ImageDecompressor was the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.

    In the new version, decompression runs automatically and it no longer a "processor". The new decompression is also smarter. It runs only when needed 鈥 when we know that image is still in a compressed format and wasn't decompressed by one of the image processors.

    馃敡 Decompression runs on a new separate imageDecompressingQueue. To disable decompression you can set a new isDecompressionEnabled pipeline configuration option to false.

    #247 Avoiding Duplicated Work when Applying Processors

    The pipeline avoids doing any duplicated work when loading images. Now it also avoids applying the same processors more than once. For example, let's take these two requests:

    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. If any of the intermediate results are available in the data cache, they will be used.

    ImagePipeline v2

    Nuke 8 introduced a major new iteration of the ImagePipeline class. The class was introduced in Nuke 7 and it contained a lot of incidental complexity due to addition of progressive decoding and some other new features. In Nuke 8 it was rewritten to fully embrace progressive decoding. The new pipeline is smaller, simpler, easier to maintain, and more reliable.

    It is also faster.

    馃悗 +30% Main Thread Performance

    The image pipeline spends even less time on the main thread than any of the previous versions. It's up to 30% faster than Nuke 7.

    #239 Load Image Data

    鉃 Add a new ImagePipeline method to fetch original image data:

    @discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask
    

    馃殌 This method now powers ImagePreheater with destination .diskCache introduced in Nuke 7.4 (previously it was powered by a hacky internal API).

    #245 Improved ImageRequest API

    The rarely used options were extracted into the new ImageRequestOptions struct and the request initializer can now be used to customize all of the request parameters.

    #255 filteredURL

    You can now provide a filteredURL to be used as a key for caching in case the URL contains transient query parameters:

    let request = ImageRequest( url: URL(string: "http://example.com/image.jpeg?token=123")!, options: ImageRequestOptions( filteredURL: "http://example.com/image.jpeg" ) )
    

    #241 Adopt Result type

    Adopt the Result type introduced in Swift 5. So instead of having a separate response and error parameters, the completion closure now has only one parameter - result.

    public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> Void
    

    馃悗 Performance

    馃悗 Apart from the general performance improvements Nuke now also offers a great way to measure performance and gain visiblity into how the system behaves when loading images.

    #250 Integrate os_signpost

    鈫 Integrate os_signpost logs for measuring performance. To enable the logs set ImagePipeline.Configuration.isSignpostLoggingEnabled (static property) to true before accessing the shared pipeline.

    馃悗 With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains os_signpost in a great detail.

    Screenshot 2019-06-01 at 10 46 52

    馃摎 Documentation

    馃摎 All the documentation for Nuke was rewritten from scratch in Nuke 8. It's now more concise, clear, and it even features some fantastic illustrations:

    Screenshot 2019-06-11 at 22 31 18

    The screenshots come the the reworked demo project. It gained new demos including Image Processing demo and also a way to change ImagePipeline configuration in runtime.

    Misc

    • 鉃 Add a cleaner way to set ImageTask priority using a new priority property 鈥 #251
    • 馃崕 [macOS] Implement image cost calculation for ImageCache#236
    • 馃憤 [watchOS] Add WKInterfaceImage support
    • 馃洜 Future-proof Objective-C ImageDisplaying protocol by adding nuke_ prefixes to avoid clashes in Objective-C runtime
    • 鉃 Add convenience func decode(data: Data) -> Image? method with a default isFinal argument to ImageDecoding protocol 鈥 e3ca5e
    • 鉃 Add convenience func process(image: Image) -> Image? method to ImageProcessing protocol
    • DataCache will now automatically re-create its root directory if it was deleted underneath it
    • 鉃 Add public flush method to DataCache
  • v8.0-beta.4 Changes

    June 07, 2019

    A small bump to address the feedback from Nuke 8.0-beta.3.

    • 馃憣 Improve debug descriptions for processors, adopt reverse DNS notation for cache keys
    • 鈴 Revert the changes made in #254 Improve image view extensions. There is going to be no major changes in the primary Nuke.loadImage(:) API in Nuke 8. The extensions are going to be revisited when adding SwiftUI and Combine support.
    • 馃悗 Tune the performance, now we can safely say there is a +25% improvement in some of the common use cases on the main thread.
    • 馃摎 [Documentation] Update some of the documentation
    • 馃敡 [Demo] Add a Settings screen to the demo project to allow change ImagePipeline configuration in runtime
  • v8.0-beta.3 Changes

    June 02, 2019

    #257 Image Processing Improvements

    • 鈾伙笍 Refactor the existing processors
    • 鉃 Add new ImageProcessor.Crop, previously cropping was an option in ImageProcessor.Resize and there was a known defect when cropping images smaller than the target size which is fixed in the new implementation
    • 馃崕 Make ImageProcessor.Resize and ImageProcessor.Crop available on macOS
    • 鉃 Add CustomStringConvertible implementations for each image processor
    • 鉃 Add documentation for image processors

    #259 Revert Addition of ImageTaskDelegate

    • 馃殌 ImageTaskDelegate was a new API introduced in Nuke 8.0-beta.1 to improve the pipeline performance. After some extensive profiling it was clear that this change wasn't truly worth the increased complexity and the changes in the established public API, thus this change was reverted.
  • v8.0-beta.2 Changes

    June 01, 2019

    鈿★笍 There quite a few important changes in this update. Probably the most important one is the addition of Deprecated.swift file which eases the transition from Nuke 7 to Nuke 8 which are now almost completely source compatible.

    馃殌 > Naturally, this beta includes everything from Nuke 8.0-beta.1.

    #250 Integrate os_signpost for profiling

    鈫 Integrate os_signpost logs for measuring performance. To enable the logs set ImagePipeline.Configuration.isSignpostLoggingEnabled (static property) to true before accessing the shared pipeline.

    馃悗 With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains os_signpost in a great detail.

    Screenshot 2019-06-01 at 10 46 52

    #254 Improve Image Loading Extensions

    • 鉃 Add imageView.nk.setImage(with:) family of methods as a replacement for Nuke.loadImage(with:into:). The latter wasn't grammatically correct, that's the first. setImage(with:) methods are also more conventional. So now in order to load an image and display it in a view you would simply do this:

      imageView.nk.setImage(with: URL(string: "http://example.com/image.jpeg")!)

    • 馃洜 Future-proof Objective-C ImageDisplaying protocol by adding nuke_ prefixes to avoid clashes in Objective-C runtime

    • 鉃 Add WKInterfaceImage support

    Other Changes

    • 0锔忊儯 Enable processing deduplication by default 鈥 #252
    • 鉃 Add filterURL options to ImageRequestOptions to filter unwanted query parameters when generating cache keys - #255
    • 鉃 Add Deprecated.swift file to ease transition from Nuke 7 to Nuke 8 - #253
    • 馃崕 Implement image cost calculation in ImageCache for macOS 鈥 #236
    • 鉃 Add a cleaner way to set ImageTask priority using a new priority property 鈥 #251
    • 鉃 Add convenience func decode(data: Data) method with a default isFinal argument to ImageDecoding protocol 鈥 e3ca5e
    • DataCache will now automatically re-create its root directory if it was deleted underneath it
  • v8.0-beta.1 Changes

    May 23, 2019

    馃殌 This is the first Nuke 8 beta. There is going to be at least one more beta released in June updated according to your feedback.

    Image Processing Improvements

    #227 Caching Processed Images

    馃殌 ImagePipeline now supports caching of processed images. To enable this feature set isDataCacheForProcessedDataEnabled to true in the pipeline configuration and provide a dataCache. You can use a built-in DataCache introduced in Nuke 7.3 which supports parallel reads, and instant writes.

    Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.

    #243 Add Image Processors

    鉃 Add the following image processors:

    • ImageProcessor.Resize
    • ImageProcessor.RoundedCorners
    • ImageProcessor.Circle
    • ImageProcessor.GaussianBlur
    • ImageProcessor.CoreImageFilter

    馃殌 More processors will be added in the upcoming releases.

    #245 Simplified Processing API

    馃憤 Previously there were quite a few different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:

    let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )
    

    Processors can also be set using a respective mutable processors property.

    馃敂 Notice that AnyImageProcessor is also finally gone. You can just use ImageProcessing protocol directly everywhere.

    #229 Smart Decompression

    0锔忊儯 In the previous versions, the decompression was part of the processing API and ImageDecompressor was the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.

    In the new solution, decompression runs automatically and no longer conflicts with the other processors that you set on the request.

    The new decompression is also smarter. It runs only when needed: either if there are no processors provided in the request or when these processors didn't change the original image in any way (e.g. ImageProcessor.Resize decided not to upscale the image). Decompression also runs after reading the processed image from disk.

    Decompression runs on a new separate imageDecompressingQueue. To disable it set isDecompressionEnabled to false.

    #247 Avoiding Duplicated Work when Applying Processors (Experimental)

    0锔忊儯 An experimental feature disabled by default. To enabled it, set isProcessingDeduplicationEnabled to true. When enabled, the pipeline will avoid any duplicated work when processing images. For example, let's take the following requests:

    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. If any of the intermediate results are available in the data cache, they will be used.

    ImagePipeline v2

    Nuke 8 introduced a major new iteration of the ImagePipeline class. It was completely rewritten to embrace progressive decoding and deduplication introduced in Nuke 7.

    The new pipeline is smaller, simpler, easier to maintain, and more reliable than the previous iteration. It is powered by a new internal Task abstraction which is extremely powerful.

    馃悗 Up to 30% Faster Main Thread Performance

    With some of the changed introduced in the pipeline, the primary Nuke.loadImage(with:into:) method became even faster than any of the previous versions on the main thread, up to 30% faster.

    #237 Add ImageTaskDelegate

    Extend ImagePipeline API with a new method:

    public func imageTask(with request: ImageRequest, delegate: ImageTaskDelegate) -\> ImageTask
    

    This API is meant to be used for advanced features like progressive image decoding. It is also one of the primary reasons why the pipeline is so much faster in Nuke 8.

    #239 Load Image Data

    鉃 Add a new ImagePipeline method to fetch original image data:

    @discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask
    

    馃殌 This method now powers ImagePreheater with destination .diskCache introduced in Nuke 7.4 (previously it was powered by a hacky internal API).

    #245 Improved ImageRequest API

    The rarely used options were extracted into new ImageRequestOptions struct and the processor initializer can now be used to customize all of the request parameters.

    #241 Adopt Result type

    Adopt the Result type introduced in Swift 5. So instead of having a separate response and error parameters, the completion closure now has only one parameter - result.

    public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> Void
    

    Future Improvements

    馃悗 There are a few improvements planned for Nuke 8 but which are still in the progress including new performance metrics, new ways to customize cache keys, more processors, more API refinements.

    馃摎 The documentation, the demos, and the migrations guides are also be updated later and available with RC.

  • v7.6.3 Changes

    May 01, 2019
    • 馃洜 Fix #226ImageTask.setPriority(_:) sometimes crashes
  • v7.6.2 Changes

    April 24, 2019
    • 馃敀 Fix Thread Sanitizer warnings. The issue was related to unfair_lock usage which was introduced as a replacement for OSAtomic functions in Nuke 7.6. In order to fix the issue, unfair_lock was replaced with simple NSLock. The performance hit is pretty insignificant and definitely isn't worth introducing this additional level of complexity.
  • v7.6.1 Changes

    April 13, 2019