Remix.run Logo
landl0rd 2 hours ago

AOT is a little fussy in real-world usage particularly for things like reflection. You can probably force it to work but it may make your code much uglier.

Span<T> is more important for performance TBH JIT warmup isn't a huge issue for a long-running process

CharlieDigital 2 hours ago | parent | next [-]

    > ...but it may make your code much uglier
Flip side is that if you use more source generation, it may end up making the code more terse/"prettier" where it matters and avoid the reflection hit.

AI agents seem fairly good at generating source generators so there doesn't seem to be a reason to not use them.

orphea an hour ago | parent | prev | next [-]

What's fussy about AOT and reflection?

pjc50 25 minutes ago | parent [-]

Only a subset of reflection is actually AoT safe, and you can run into issues like "the method you wanted to call wasn't statically referenced anywhere, so there is no compiled implementation of it".

sebazzz 2 hours ago | parent | prev [-]

With UnsafeAccessor you can often avoid reflection.