Skip to content

Commit e43505c

Browse files
(138138207) JSONEncoder using large amount of memory when encoding array of structs (#1039)
Co-authored-by: Kevin Perry <kperry@apple.com>
1 parent a9dc42c commit e43505c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/JSON/JSONEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ enum JSONFuture {
589589
var dict: [String: JSONFuture] = [:]
590590

591591
init() {
592-
self.dict.reserveCapacity(20)
592+
self.dict.reserveCapacity(4)
593593
}
594594

595595
init(dict: [String: JSONFuture]) {

0 commit comments

Comments
 (0)