kean/Nuke
76.5
Strong · 14 November 2026
31k
lines of production code
Swift
primary language
7
measurements over time
What this system is
Features
Add performance demo screens for decompression and prefetching
The Demo/Performance area now includes two new interactive screens: DecompressionDemo, which visualizes the main-thread frame savings and memory impact of background JPEG decompression and \UIImage.preparingForDisplay()\, and PrefetchingDemo, which demonstrates \ImagePrefetcher\ behavior in both UIKit and SwiftUI, tracking how many images are ready in the cache before they appear on screen. Also in this area: 1 commit (0 fixes) modifying Demo; Demo app migrates to NukeExtensions module.
Demo/Performance · medium confidence · unverified
Add pipeline diagnostics probe to the demo app
The demo app now includes a \DemoPipelineProbe\ that acts as a delegate for every image pipeline, collecting detailed metrics on task counts, cache hits (memory, disk, HTTP), download progress, decoding times, and queue states. This probe enables a new HUD overlay on demo screens to visualize pipeline performance and allows screens to list delegate calls and data loader events for debugging purposes.
Demo/Helpers/Probe · high confidence
New AnimatedImage view and player for SwiftUI and UIKit
This change introduces a new \AnimatedImage\ SwiftUI view and \AnimatedImageView\ UIKit/AppKit view, along with the \AnimatedImagePlayer\ class, to natively play animated images (such as GIFs) within the NukeUI framework. The \AnimatedImage\ view integrates with SwiftUI's layout system, respecting \resizable()\ and content modes, and automatically pauses playback when the view is off-screen or when Accessibility settings disable auto-play. The underlying \AnimatedImagePlayer\ manages frame decoding off the main thread, synchronizes playback across multiple views showing the same animation, and shares decoded frames via a global \AnimatedImageFramePool\ to optimize memory usage. The pool intelligently manages memory by holding full animations in memory when possible, falling back to a small window of frames for larger animations, and responding to system memory warnings and Low Power Mode by throttling playback or releasing idle frames.
Sources/NukeUI/AnimatedImages · high confidence
New Animation Lab, Priority Coalescing, and Scroll Stress demos in the Lab
The Lab now includes three new interactive demos. Animation Lab visualizes up to 36 simultaneous animations to demonstrate the shared AnimatedImageFramePool, allowing users to adjust the pool budget (4–256 MB), trigger memory warnings, and toggle lockstep synchronization. Priority Coalescing demonstrates how the pipeline handles concurrent requests by showing task counts, download slots, and priority-based queue ordering across twenty requests for six photos. Scroll Stress tests pipeline performance under heavy load by auto-scrolling a grid of images with caching and coalescing disabled, providing real-time frame rate and dropped frame metrics.
Demo/Lab · high confidence
New Nuke Demo app with catalog, Lab, and pipeline HUD
The repository now includes a new SwiftUI-based demo application that provides a structured catalog of Nuke features (Essentials, Formats, Performance, Integration) and a dedicated Lab section for stress testing and diagnostics. The app introduces a global Pipeline HUD overlay that displays real-time pipeline metrics and opens detailed task information, and supports automated testing via launch arguments that can open specific screens, enable autorun, and configure the HUD state.
Demo/App · high confidence
New Pipeline Performance HUD for Demos
A new HUD overlay is now available in the demo apps, providing real-time performance metrics for image pipelines. It displays a compact card with key figures (active tasks, hit rate, task duration) and, when expanded, detailed charts tracking the last 30 seconds of pipeline activity, including request sources (memory, disk, network) and queue utilization. The HUD also monitors display frame rates and app memory footprint. Users can drag the HUD to any screen corner, pin it to a specific pipeline, and open a detailed sheet to inspect cache usage and control queue suspension.
Demo/Helpers/HUD · high confidence
New demo helper utilities and resources
The demo application now includes a comprehensive set of helper utilities in the Demo/Helpers directory to support its screens and diagnostics. This includes \DemoAnimations\ for managing and loading animated image formats (GIF, APNG, WebP, HEIC) with player integration, and \DemoAutoScroll\ for driving consistent, timed scrolling in grid views to measure throughput. New data loaders like \PacedDataLoader\ and \ThrottledDataLoader\ allow simulating slow or chunked network conditions to visualize progressive decoding and download behavior. The update also introduces \GridPrefetcher\ for SwiftUI grids, \DemoImageHeader\ for inspecting file metadata, and \DemoErrorText\ for user-friendly error reporting. Supporting resources include a shared \DemoImages\ enum for network URLs, a \photos.json\ fixture list, and UI components like \DemoInfo\ sheets and \DemoUI\ styling helpers.
Demo/Helpers · high confidence
New demo screens for image processing, LazyImage, and UIKit views
The Essentials demo now includes dedicated screens for Image Processing, LazyImage, and UIKit Views. The Image Processing screen demonstrates built-in and custom processors, cache keys, and memory diagnostics. The LazyImage screen covers loading states, transitions, processors, and the FetchImage observable object. The UIKit Views screen compares the UIImageView extension (where the app owns loading states) with LazyImageView (where the view owns them).
Demo/Essentials · high confidence
New image loading diagnostics with detailed task metrics and timeline reporting
Developers can now enable runtime diagnostics on the image pipeline to capture detailed performance data for every image task. When enabled via \isDiagnosticsEnabled\ or the \NUKE\_DIAGNOSTICS\_ENABLED\ environment variable, each task finishes with a \Metrics\ record available on \ImageTask\. This record includes a text-based timeline showing exactly where time was spent (cache lookups, downloads, decoding, processing), job coalescing information, priority changes, and granular \URLSession\ metrics. The metrics are versioned, \Codable\, and can be formatted into a structured report suitable for bug reports or logging, providing visibility into load times and resource usage without external profiling tools.
Sources/Nuke/Diagnostics · high confidence
New video playback and decoding capabilities in NukeVideo
The NukeVideo module now includes a video decoder that extracts thumbnails and AVAsset data from MP4, M4V, and MOV files, along with a cross-platform VideoPlayerView for rendering that content. This view supports looping, muting, and frame resizing, and specifically fixes a bug where looping videos on macOS would not resume when the window regained focus, while also ensuring proper cleanup of notification observers.
Sources/NukeVideo · high confidence
Behavioural changes
3 commits (0 fixes) modifying Demo
A change to existing behaviour in Demo — 3 commits, 6 files: “Remove ImageDecoding.isAsynchronous”; “Import Combine in the animated images demo, which names its types”; “Rename ImageTask.taskId to taskID”. Also in this area: New Nuke Demo app with catalog, Lab, and pipeline HUD.
Demo/Integration · medium confidence · unverified
30 commits (2 fixes) modifying .scripts
A change to existing behaviour in .scripts — 30 commits (2 fixs), 6 files: “Simplify ci.sh”; “Add a skill for optimizing Nuke”; “Add an article on replacing AsyncImage with LazyImage”; and 27 more.
.scripts · medium confidence · unverified
6 commits (0 fixes) modifying Demo/Formats
A change to existing behaviour in Demo/Formats — 6 commits, 4 files: “Use one name for the animation”; “Make AnimatedImagePlayer.Diagnostics read-only outside NukeUI”; “Rename AnimatedImagePlayer.RepeatCount to LoopCount”; and 3 more.
Demo/Formats · medium confidence · unverified
DataLoader now supports session-level delegates and incremental delivery control
The DataLoader class now exposes a \delegate\ property conforming to \URLSessionDelegate\, allowing users to handle session-wide events such as authentication challenges and to integrate with network debugging tools like Pulse. Additionally, a new \prefersIncrementalDelivery\ boolean property has been added to control whether partial response bodies are delivered in increments, which is disabled by default. These changes enhance the flexibility of the data loading layer for advanced networking scenarios and diagnostics.
Sources/Nuke/Loading · high confidence
Demo images now serve from local fixtures for offline testing
The demo app no longer requires network access to load images; it now uses a local fixture system that serves generated or bundled images (JPEG, GIF, APNG, WebP, and a custom NukePix format) via a custom \DataLoading\ implementation. This allows users to test image loading, decoding, and pacing behaviors completely offline, with support for simulating network conditions like latency and chunked delivery, as well as range requests for resumable downloads.
Demo/Helpers/Fixtures · high confidence
ImagePrefetcher completion callback now runs on the main thread
The \didComplete\ closure in \ImagePrefetcher\ is now guaranteed to execute on the main queue, ensuring that any UI updates or state changes performed in response to prefetching completion are thread-safe without requiring manual dispatching. This change simplifies integration by removing the need for callers to wrap the callback in \DispatchQueue.main.async\.
Sources/Nuke/Prefetching · high confidence
Internal performance optimizations and concurrency safety improvements
This update refactors internal components to improve performance and concurrency safety. SHA1 hashing is optimized by using CryptoKit and avoiding intermediate allocations. Cache and task keys now use reference types and pre-computed hash values to speed up lookups. The rate limiter's default request rate is increased to 100 per second. URL scheme comparisons for local resources are now case-insensitive. Resumable data storage is synchronized using the ImagePipelineActor, and various Sendable and concurrency warnings are fixed to ensure thread safety.
Sources/Nuke/Internal · high confidence
Major concurrency overhaul and API simplification in Nuke
The Nuke library has been rewritten to adopt modern Swift concurrency, replacing the legacy delegate-based architecture with async/await and AsyncStream. ImageTask now exposes typed throws for errors, provides a unified Status snapshot for state, and streams progress and events, while ImageRequest is simplified by removing the userInfo parameter and deprecated ImageRequestConvertible conformance. Internally, the pipeline uses OSAllocatedUnfairLock for thread safety, implements Copy-on-Write for ImageContainer to reduce allocations, and attaches raw data to animated images to support playback in NukeUI.
Sources/Nuke · high confidence
New image encoding system with format-specific and adaptive encoders
The image encoding subsystem has been restructured to provide more control over output formats and reliability. A new \ImageEncoders.ImageIO\ encoder allows users to explicitly specify output formats (such as JPEG, PNG, or HEIC) and compression ratios, while a new \ImageEncoders.Default\ encoder automatically selects the best available format based on image properties (e.g., using HEIC if preferred and supported, otherwise JPEG for opaque images or PNG for transparent ones). Additionally, the encoding protocol now returns \nil\ instead of empty data when encoding fails, and GIF images are preserved in their original data format rather than being re-encoded, fixing issues where GIFs were incorrectly stored as JPEGs in the disk cache.
Sources/Nuke/Encoding · high confidence
Nuke 14 API overhaul: async/await, new delegate, and removed legacy APIs
The pipeline now uses Swift concurrency (async/await) as the primary interface, replacing the previous closure-based callbacks with methods like \image(for:)\ and \data(for:)\. The old \ImagePipelineDelegate\ has been replaced by \ImagePipeline.Delegate\, which uses async methods for hooks like \willLoadData\ and \willCache\. Legacy APIs such as \ImagePublisher\, \maximumDecodedImageSize\, and \isSignpostLoggingEnabled\ have been removed (kept as unavailable stubs in \Deprecated.swift\), and the pipeline is now backed by a new \ImagePipelineActor\ for internal coordination.
Sources/Nuke/Pipeline · high confidence
Nuke Xcode project structure updated for modern Swift and documentation
The Nuke Xcode project has been restructured to support modern Swift development and improved documentation workflows. The project now includes dedicated documentation catalogs (Nuke.docc, NukeUI.docc) for DocC integration, and the build configuration has been updated to Swift 5.0. The project structure consolidates targets, embedding Nuke, NukeUI, and NukeVideo frameworks, and removes legacy components like NukeExtensions in favor of the unified NukeUI target. This change simplifies the project layout and aligns it with current Apple development standards.
Nuke.xcodeproj · high confidence
NukeUI restructured with new SwiftUI and UIKit components
The NukeUI module has been reorganized to provide a modern SwiftUI experience alongside updated UIKit/AppKit support. The new \LazyImage\ SwiftUI view and \LazyImageView\ UIKit component replace previous patterns, offering consistent APIs for asynchronous image loading with features like custom placeholders, transitions, and progress tracking. The \FetchImage\ observable object simplifies programmatic image loading in SwiftUI, while the \ImageLoadingOptions\ struct centralizes configuration for placeholders, failure images, and content modes. The \NukeExtensions\ module is now a shim that re-exports \NukeUI\ for backward compatibility, and deprecated APIs have been moved to a dedicated \Deprecated.swift\ file with clear migration messages.
Sources/NukeUI · high confidence
Redesigned animated image decoding with browser-consistent playback and progressive JPEG improvements
The decoding subsystem has been restructured to handle animated images (GIF, APNG, WebP, HEIC, AVIF) with behavior that matches web browsers: GIFs without a loop extension now play once instead of looping forever, and frame delays below 11ms are corrected to 100ms to prevent excessive CPU usage. Animated image metadata (frame count, delays, loop count) is now parsed once during decoding and attached to the image container, allowing views to access animation properties without re-parsing. Progressive JPEG support has been improved with better handling of End-Of-Image markers and a thumbnail fallback for JPEGs with large EXIF headers that prevent incremental decoding. The system now uses a new \AnimatedImageSource\ class to describe animations and an \AnimatedImageFrameDecoder\ actor to decode frames off the main thread, ensuring smooth playback. A new \ImageDecoderRegistry\ allows registering and unregistering decoders, and \AssetType\ provides a unified way to identify image formats including new support for AVIF, ICO, and HEIC sequences.
Sources/Nuke/Decoding · high confidence
Refactored image processing API with new options namespace and optimized identity handling
The image processing pipeline has been restructured to improve performance and API clarity. Processor identities are now boxed into a dedicated \ImageProcessorID\ type to avoid expensive string creation and runtime lookups during cache comparisons. Common configuration options, such as \ContentMode\ and \Unit\, have been moved into a shared \ImageProcessingOptions\ namespace. Additionally, a new \ImageDecompression\ module manages image decompression state, and the \ImageProcessing\ protocol now includes a \hashableIdentifier\ property for faster equality checks.
Sources/Nuke/Processing · high confidence
Replaced NSCache with a custom LRU memory cache and restructured disk caching
The memory cache implementation has been replaced with a custom LRU (Least Recently Used) cache to provide precise cost enforcement, as the previous NSCache-based approach only treated cost limits as hints. This new Cache class uses a CLOCK/second-chance algorithm for efficient eviction and splits the memory budget between the main image cache and animated frame pools. Additionally, the disk caching layer (DataCache) has been restructured to perform reads asynchronously and drain the staging area with a single writer task, improving concurrency and reducing main-thread blocking during cache operations.
Sources/Nuke/Caching · high confidence
Rewritten image loading tasks with async/await and improved caching
The image loading tasks in the pipeline have been rewritten to use Swift's async/await concurrency model, replacing the previous operation-based and stream-based implementations. This change introduces new task classes (AsyncPipelineTask, AsyncTask) that manage subscriptions and diagnostics more efficiently, and updates the data loading and decoding stages to run asynchronously on dedicated queues. Additionally, the caching logic has been refined to better handle original data lookups for thumbnail and processed requests, ensuring that cached data is correctly retrieved and stored, and improving the handling of progressive decoding and resumable downloads.
Sources/Nuke/Tasks · high confidence
Simplified Xcode workspace configuration
The Xcode workspace has been streamlined to reference a single project target, removing previous multi-target complexity. This change updates the workspace data file to point directly to the main project and adds the standard IDE workspace check file to ensure consistent build settings across development environments.
Nuke.xcodeproj/project.xcworkspace · medium confidence
Soft-deprecation of NukeExtensions in favor of NukeUI
The NukeExtensions module is now soft-deprecated in Nuke 14, with documentation recommending the migration to \ImageLoader\ APIs in NukeUI. The \ImageLoadingOptions\ struct and \ImageDisplaying\ protocol have been updated to be \Sendable\ and isolated to \MainActor\ for concurrency safety, and support for \TVPosterView\ has been added on tvOS.
Sources/NukeExtensions · high confidence
Updated Xcode project schemes and build configurations
The Xcode project schemes have been updated to reflect the addition of new targets (NukeUI, NukeVideo, NukeDemo) and test suites (Thread Safety, Performance). Key behavioral changes include enabling parallel builds across targets, activating code coverage for the Nuke, NukeUI, and NukeVideo frameworks, and enabling the Thread Sanitizer for NukeTests and NukeThreadSafetyTests. Additionally, the Nuke launch scheme now configures environment variables for allocation tracking (NUKE\_ALLOCATIONS\_PERIODIC\_LOG), while the NukeDemo scheme has diagnostics logging disabled by default.
Nuke.xcodeproj/xcshareddata · high confidence
Test coverage
27 commits adding/updating tests in Tests/DocumentationSnippets; Added Info.plist for the test bundle; Added Swift Testing performance benchmarks for Nuke components; Added Swift Testing suite for NukeExtensions image view integration; Added comprehensive test coverage for NukeVideo; Added diagnostics metrics test fixtures; Added stress tests for thread safety in caches, pipeline, and prefetcher; Added test coverage for NukeUI animated image playback and memory management; Adopt scene lifecycle in the test host; Expanded test coverage for Nuke 13 image pipeline features; Expanded test coverage for animated image handling and asset type detection; Expanded test coverage for image processors and decoding; New test helpers for animated image fixtures and pixel-accurate assertions; New test mocks for Nuke pipeline components.
Dependencies
Swift Package Manager configuration updated for Nuke 14 with visionOS support
The Package.swift manifest has been updated to define the Nuke package structure, introducing new targets for NukeUI, NukeVideo, and NukeExtensions, and raising the minimum deployment targets to iOS 16, tvOS 16, macOS 13, watchOS 9, and adding support for visionOS 1. A separate Package.swift for DocumentationSnippets has also been added to support building UIKit and Objective-C samples for iOS in CI.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 70 → 76 (+6.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 98 → 94 (-3.8)
- Architecture 90 → 97 (+7.4)
- Maturity 59 → 67 (+8.0)
- Readiness 75 → 78 (+2.9)
- Security 85 → 85 (+0.0)
- Performance 78 → 100 (+21.7)
Resolved (14)
- AssetType.make (cognitive 18) (Sources/Nuke/Decoding/AssetType.swift)
- AssetType.make (cyclomatic 19) (Sources/Nuke/Decoding/AssetType.swift)
- Duplicated block (10 lines × 2) (Demo/Essentials/LazyImageDemo.swift)
- Duplicated block (13 lines × 2) (Demo/Essentials/LazyImageDemo.swift)
- Duplicated block (17 lines × 2) (Demo/App/DemoScreen.swift)
- Duplicated block (8 lines × 2) (Sources/NukeUI/FetchImage.swift)
- Duplicated block (9 lines × 2) (Demo/Helpers/DemoUI.swift)
- Hotspot: Sources/Nuke/Decoding/AssetType.swift (Sources/Nuke/Decoding/AssetType.swift)
- Low cohesion: CGSize (LCOM4 5) (Sources/Nuke/Internal/Graphics.swift)
- Low cohesion: Metrics (LCOM4 7) (Sources/Nuke/Diagnostics/ImageTask+Metrics.swift)
- No ADRs found
- No assertions: overflow (Tests/NukeTests/RateLimiterTests.swift)
- Projects may be oversized for their cohesion
- TaskFetchOriginalData.start (cognitive 17) (Sources/Nuke/Tasks/TaskFetchOriginalData.swift)
New (56)
- AnimatedImagePlayer.tick (cyclomatic 16) (Sources/NukeUI/AnimatedImages/AnimatedImagePlayer.swift)
- Change coupling: ImageDecompression.swift ↔ ImageViewExtensions.swift (Sources/Nuke/Processing/ImageDecompression.swift)
- Duplicated block (10 lines × 2) (Demo/Essentials/LazyImageDemo.swift)
- Duplicated block (13 lines × 2) (Demo/Essentials/LazyImageDemo.swift)
- Duplicated block (8 lines × 2) (Sources/NukeUI/FetchImage.swift)
- Edited copies of one member (3 members, 3+ corresponding lines) (Sources/Nuke/Loading/DataLoader.swift)
- Edited copies of one member (3 members, 8+ corresponding lines) (Sources/Nuke/Loading/DataLoader.swift)
- Edited copies of one member (4 members, 14+ corresponding lines) (Sources/Nuke/ImageRequest.swift)
- Edited copies of one member (4 members, 4+ corresponding lines) (Sources/Nuke/Pipeline/Deprecated.swift)
- Edited copy of a member (10 corresponding lines) (Demo/Formats/ImageFormatsDemo.swift)
- Edited copy of a member (10 corresponding lines) (Sources/NukeUI/ImageLoader+ImageView.swift)
- Edited copy of a member (11 corresponding lines) (Demo/Helpers/Fixtures/DemoFixtureLoader.swift)
- Edited copy of a member (11 corresponding lines) (Sources/NukeExtensions/ImageViewExtensions.swift)
- Edited copy of a member (12 corresponding lines) (Sources/Nuke/Internal/Graphics.swift)
- Edited copy of a member (13 corresponding lines) (Demo/Helpers/Fixtures/DemoFixtureLoader.swift)
- Edited copy of a member (14 corresponding lines) (Demo/Helpers/DemoErrorText.swift)
- Edited copy of a member (14 corresponding lines) (Demo/Helpers/HUD/DemoHUD.swift)
- Edited copy of a member (15 corresponding lines) (Sources/Nuke/Tasks/TaskFetchOriginalData.swift)
- Edited copy of a member (16 corresponding lines) (Demo/Formats/ImageFormatsDemo.swift)
- Edited copy of a member (17 corresponding lines) (Sources/Nuke/Tasks/AsyncPipelineTask.swift)
- …and 36 more
Changes since last survey
- 230 commits — 184 feature/other, 46 fixes
By area
- (repo) — 68 commits
- (root) — 58 commits
- Sources/Nuke — 41 commits
- Sources/NukeUI — 17 commits
- Tests/NukeTests — 16 commits
- Documentation/Nuke.docc — 7 commits
- Tests/NukeUITests — 5 commits
- Documentation/NukeUI.docc — 3 commits
- Tests/NukePerformanceTests — 3 commits
- Documentation/Migrations — 2 commits
- Tests/NukeVideoTests — 2 commits
- .claude-plugin/marketplace.json — 1 commit
- Demo/App — 1 commit
- Demo/Formats — 1 commit
- Demo/Lab — 1 commit
- Skills/nuke-migrate — 1 commit
- Tests/Helpers — 1 commit
- Tests/NukeThreadSafetyTests — 1 commit
- skills/nuke-optimize — 1 commit
Notable commits
- fix: Fix Circle and RoundedCorners drawing the border at half the requested width
- fix: Fix GaussianBlur converting wide-gamut images to device RGB
- fix: Fix GaussianBlur returning a corrupted image for radii of 1544 and up
- fix: Fix Resize failing for thin images whose short side scales below half a pixel
- fix: Fix Resize(width:) and Resize(height:) capping the other dimension at 9999
- fix: Fix ThumbnailOptions sizing an EXIF-rotated thumbnail against the stored pixels on macOS
- fix: Fix data slices, short data, and posters in NukeVideo
- fix: Fix hang in asyncDecoderProducesPreviews by serving chunks on progress
- fix: Fix processing changing the NSImage point size of high-DPI images on macOS
- fix: Fix samples that drifted from the API
- fix: Fix the DocC links that don't resolve
- fix: Fix the Resize crop documentation naming the wrong content mode
- fix: Fix the crash and the timing of the LazyImage first show benchmark
- fix: Fix the default decoder's previews: orientation, thumbnail requests, GIF numbering
- fix: Fix the thumbnail fallback tests for Image I/O in macOS 26.7
- fix: Fix what two agents found in the skill
- fix: Merge branch 'main' into fix/default-decoder-previews
- fix: Merge branch 'main' into fix/graphics-thumbnail-resize-border
- fix: Merge pull request #1009 from kean/fix/processed-gif-disk-cache
- fix: Merge pull request #1016 from kean/fix/store-processed-image-from-disk-original
- …and 210 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
kean/Nuke was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 740dff31db9d4b1916a1651e5e50abccd1f18cdf — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.