[Pitch] Update SE-0419 with ImageMap type

While implementing SE-0419, it became apparent that holding the list of loaded images as a plain Array was inefficient and also resulted in the rather odd captureImages() method on Backtrace.

This pitch is just for an update to SE-0419 to specify instead that the loaded images be held in an ImageMap, which is a Collection so can still be indexed in a similar way to Array, but which has its own capture() method.

Behind the scenes this allows for a couple of extra optimizations, as well as making for easier Codable support.

Additionally SymbolicatedBacktrace was adjusted to use an Array of Frames, because unlike Backtrace where it made sense to hide the type so that we can store the data in compressed form, SymbolicatedBacktrace is very much an expanded form already and minimising space there isn't really a goal.

There's an open PR here containing the changes: [SE-0419] Tweak proposal slightly. by al45tair · Pull Request #2668 · swiftlang/swift-evolution · GitHub

7 Likes