Record vs string

would it be better to pass in record vs string in a service if the service will be used like a multi-thread?

will string use more memory than record?

It is better to have the service accept the types of parameters that make the most sense for understandability and maintainability. Efficiency of parameter handling should be far, far down your list of concerns. If after profiling you determine that a service is a bottleneck and said service accepts many strings, it may be more efficient to pass them in a structure–but only testing will determine that. I’ve encountered too many cases where one approach that should be intuitively faster is in fact slower.

Is there a specific “multi-thread” concern that you have? Normally this isn’t something you need to deal with when writing services. IS manages the vast majority of threading issues for you.