Replies: 4 comments 12 replies
-
How would this new kind of string be stored and what specifically would be different that would make it more efficient in those cases? |
Beta Was this translation helpful? Give feedback.
-
Note, too, that many of the more modern versions of these APIs use |
Beta Was this translation helpful? Give feedback.
-
dotnet/corefxlab#2350 - Get some popcorn. |
Beta Was this translation helpful? Give feedback.
-
Also note that if you take a small substring from a huge string in non-copy way and store it for long use, the huge string will be kept alive, which can hurt memory usage too. The tradeoff isn't that simple. |
Beta Was this translation helpful? Give feedback.
-
From my point of view (and within a project i was involved into) .NET/C# definitely needs another String type which can be used to optimize performance and constant memory growing when working with a lot of strings and Networking.
My observation is the following - Http/TCP/Socket working with string types do consume A LOT of memory/heap especially in highly intensive communication apps (parsing/replacing/substringing urls, HttpHeaders, etc).
Having another type of String object should always be the reference type which may be passed into framework functions and got as returning values of framework functions.
Replace, Substring, etc. consume a lot of memory creating new string objects in applications which highly intensive use strings and networking communication.
Beta Was this translation helpful? Give feedback.
All reactions