mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	markup: microoptimise for many short filenames in directory (#1534)
* markup: microoptimise for many short filenames in directory Move strings.ToLower() after the early-return length check. This is a safe operation in all cases and should slightly improve directory listing performance when a directory contains many thousands of files with short filenames. * markup: expand test cases for IsReadmeFile()
This commit is contained in:
		@@ -25,6 +25,7 @@ func TestMisc_IsReadmeFile(t *testing.T) {
 | 
			
		||||
		"abcdefg",
 | 
			
		||||
		"abcdefghijklmnopqrstuvwxyz",
 | 
			
		||||
		"test.md.test",
 | 
			
		||||
		"readmf",
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for _, testCase := range trueTestCases {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user