paperClip
Hosting Blazor Server
I've made this little blazor server web app that I need hosting for. Its gonna be low traffic with a single form on there. I want to host it on my personal computer, and I am okay with keeping it on 24/7 while I need it on, and am okay with occasionally updating whatever I need to update whenever my IP address changes. I need to have ssl and use my custom domain I have from namecheap. How difficult is this? I know IIS exists but that is the extent of my knowlege. If its really difficult or annoying to do, what hosting options are out there, that also fit into like a 20$/month budget?
37 replies
Identifying something with an attribute with IIncrementalSourceGenerator
I am currently using
ForAttributeWithMetadataName
. According to the documentation, it has a chance of generating false positives. What I am currently doing is checking the identifier and seeing if it matches the attribute name. This doesn't work in the case where an alias is used, however. Is there a consisstent way to detect an attribute?6 replies
Question about Static Readonly Field optimization in Tier 2 JIT ASM
According to this article about dotnet 7 performance improvements:
There are various things the JIT can learn about a method during tier-0 that it can then use for tier-1. For example, the very fact that the tier-0 code executed means that any statics accessed by the method will have been initialized, and that means that any readonly statics will not only have been initialized by the time the tier-1 code executes but their values won’t ever change.I wondered what would happen if the value of this field was changed after a constant was compiled into assembly. You are still able to change the field value with unsafe code (Reflection throws a
FieldAccessException
).
In this example the disassembled code shows how the Test()
method has been reduced to only a constant. However, running the program shows that updating the value of the static readonly field the method also updates. How does this work? Am I testing something wrong, or is the JIT able to detect the fact that the field as been altered and recompile the method?
Program output:
ASM via benchmarkdotnet
CS:
6 replies