{ "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2023-03-18T21:39:15.324Z", "attributedTo":"https://epiktistes.com/actors/toddsundsted", "inReplyTo":"https://types.pl/users/beta/statuses/110046317838107933", "to":["https://www.w3.org/ns/activitystreams#Public","https://types.pl/users/beta"], "cc":["https://epiktistes.com/actors/toddsundsted/followers"], "content":"

@beta fwiw this also improved the situation with the stack that i posted about a while back. stack usage is still high, but it's about 20-30x less than it was before, and enough to avoid problems. to close the loop on that i've attached a backtrace from before and after the change, using Exception::CallStack.print_backtrace.

before

[0x1011b8f9b] *Exception::CallStack::print_backtrace:Nil +107 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x102d5e0f5] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +149 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x103636fb8] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +9277272 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x102f4c952] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +2025714 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x101e9d348] *School::Domain#each_match:trace<Array(School::BasePattern+), (School::TraceNode | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +3101976 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x101ba7c79] *School::Domain#run:School::Domain::Status +633 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp

after

[0x101eec99b] *Exception::CallStack::print_backtrace:Nil +107 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x102979db5] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +149 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x1029c6dd2] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +315570 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x10298a145] *School::Domain#each_match<Array(School::BasePattern+), Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +66597 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x1028f7866] *School::Domain#each_match:trace<Array(School::BasePattern+), (School::TraceNode | Nil), &Proc(Hash(String, Bool | Char | Float32 | Float64 | Int32 | Int64 | School::DomainType | String | Symbol | Nil), Nil)>:Nil +114742 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp\r\n[0x1028db679] *School::Domain#run:School::Domain::Status +633 in /Users/tsundsted/.cache/crystal/crystal-run-spec.tmp

in the before case, there are stack frames as large as 9,277,272 bytes, which  drops to 315,570 bytes after the change (which still seems large, but i'll tackle that next). i'm assuming the inlining of the block added values on the stack, though i admit it's hard to see what would add that much!

", "mediaType":"text/html", "attachment":[], "tag":[ {"type":"Mention","name":"@beta@types.pl","href":"https://types.pl/users/beta"} ], "type":"Note", "id":"https://epiktistes.com/objects/QL_eMJySnmg" }