mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 10:35:27 +08:00 
			
		
		
		
	Changes Emoji dictionary to OrdinalIgnoreCase for performance
This code is ran on startup, and instantiating a new InvariantCultureIgnoreCase was taking up 11ms, which was half the time in AOT.
This commit is contained in:
		@@ -18,7 +18,7 @@ namespace Spectre.Console
 | 
			
		||||
    public static partial class Emoji
 | 
			
		||||
    {
 | 
			
		||||
        private static readonly Dictionary<string, string> _emojis
 | 
			
		||||
            = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
 | 
			
		||||
            = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
 | 
			
		||||
        {
 | 
			
		||||
            {{~ for emoji in emojis ~}}
 | 
			
		||||
            { "{{ emoji.identifier }}", Emoji.Known.{{ emoji.name }} },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user